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.
16 lines
237 B
Kotlin
Vendored
16 lines
237 B
Kotlin
Vendored
open class SuperFoo {
|
|
public fun bar() {
|
|
if (this is Foo) {
|
|
baz()
|
|
}
|
|
}
|
|
|
|
public fun baz() {}
|
|
}
|
|
|
|
class Foo : SuperFoo()
|
|
|
|
// 1 INVOKEVIRTUAL SuperFoo.baz
|
|
// 0 CHECKCAST Foo
|
|
// 0 INVOKEVIRTUAL Foo.baz
|