Files
kotlin-fork/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/simpleWithInheritance.fir.kt
T
Denis Zharkov 47ecaa5b06 FIR: Fix scope intersection types
Otherwise overload resolution ambiguity is reported in the test
2020-01-30 17:12:50 +03:00

39 lines
479 B
Kotlin
Vendored

// MODULE: m1
// FILE: a.kt
package p
public interface B {
public fun getParent(): B?
}
// MODULE: m2(m1)
// FILE: b.kt
package p
public interface C : B {
override fun getParent(): B?
}
// MODULE: m3
// FILE: b.kt
package p
public interface B {
public fun getParent(): B?
}
public interface D : B {
override fun getParent(): B?
}
// MODULE: m4(m3, m2)
// FILE: c.kt
import p.*
fun test(b: B?) {
if (b is C && b is D) {
b?.getParent()
}
}