Files
kotlin-fork/idea/testData/inspectionsLocal/redundantSamConstructor/resolutionAmbiguity3.kt
T
Roman Golyshev 3122760c49 Add more tests for RedundantSamConstructorInspection
- All those tests already pass, they are needed to fix the behaviour of the inspection before the changes
2020-02-19 17:16:17 +03:00

11 lines
359 B
Kotlin
Vendored

// PROBLEM: none
fun <T, R> with(t: T, action: T.() -> R) = t.action()
private fun usage(int1: Interfaces.InterfaceWithMethod1, int2: Interfaces.InterfaceWithMethod2) {
with(int1) {
with(int2) {
foo(Interfaces.FunInterface1<caret> { }) // removing SAM constructor will change resolution to InterfaceWithMethod2::foo
}
}
}