ad2689ecbf
Previously, we would ignore the candidate with the non-smartcasted receiver if they have the same symbol. Now we prefer them when they're visible or when the smart cast changes the nullability.
21 lines
229 B
Kotlin
Vendored
21 lines
229 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
interface A {
|
|
fun foo()
|
|
}
|
|
|
|
interface B : A {
|
|
fun bar()
|
|
}
|
|
|
|
interface C : A {
|
|
fun baz()
|
|
}
|
|
|
|
fun test(param: B) {
|
|
if (param is C) {
|
|
param.foo()
|
|
param.bar()
|
|
param.baz()
|
|
}
|
|
}
|