Files
kotlin-fork/compiler/testData/diagnostics/tests/resolve/kt36264.fir.kt
T
Pavel Kirpichenkov e40ba73950 [NI] Add resolution applicability for resolved candidates with error
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
2020-02-13 18:02:37 +03:00

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) {}