e40ba73950
New resolution applicability is needed in cases when error is found, but candidate still should be selected. Currently there are two cases, when this behaviour is required: - unstable smartcast (choose candidate with non-nullable parameter) - unknown lambda parameter type (against non-functional expected type) KT-36264
20 lines
264 B
Kotlin
Vendored
20 lines
264 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
|
|
interface A
|
|
class B : A
|
|
|
|
val String.ext: A
|
|
get() = TODO()
|
|
|
|
class Cls {
|
|
fun take(arg: B) {}
|
|
|
|
fun test(s: String) {
|
|
if (s.ext is B)
|
|
take(s.ext)
|
|
}
|
|
}
|
|
|
|
fun take(arg: Any) {}
|