b4b443034f
It's been introduced in the previous commit
("K2: Simplify handling mixed smartcast vs. original candidates")
Because previously, it was assumed wrongly that each next level of
ConeCallConflictResolver filter out the candidates that are 100% less
applicable/specific, but the main one (ConeOverloadConflictResolver)
either leaves the single candidate or the whole same set, thus at
FilteringOutOriginalInPresenceOfSmartCastConeCallConflictResolver
we've got 4 candidates only two of which we might filter out.
24 lines
324 B
Kotlin
Vendored
24 lines
324 B
Kotlin
Vendored
// SKIP_TXT
|
|
// FIR_IDENTICAL
|
|
|
|
abstract class A {
|
|
open public fun foo(x: Any) {}
|
|
open public fun foo(x: String) {}
|
|
}
|
|
|
|
class B : A() {
|
|
override fun foo(x: Any) {
|
|
super.foo(x)
|
|
}
|
|
|
|
override fun foo(x: String) {
|
|
super.foo(x)
|
|
}
|
|
}
|
|
|
|
fun bar(a: A) {
|
|
if (a is B) {
|
|
a.foo("")
|
|
}
|
|
}
|