47ecaa5b06
Otherwise overload resolution ambiguity is reported in the test
16 lines
198 B
Kotlin
Vendored
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>() }
|
|
}
|
|
}
|