Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/mostSpecificIrrelevant.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

16 lines
198 B
Kotlin
Vendored

// !CHECK_TYPE
interface A {
fun foo(): CharSequence?
}
interface B {
fun foo(): String
}
fun test(c: Any) {
if (c is B && c is A) {
c.foo().checkType { _<String>() }
}
}