Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/nullability/smartCastRefinedClass.fir.kt
T
Denis Zharkov f97cc0b62d FIR: Rework receivers processing in resolution
- Put extensionReceiver to candidate even if it's explicit (for sake of clarity)
- Split CheckReceiver (dispatch part should only check nullability)
2020-11-16 15:50:39 +03:00

14 lines
209 B
Kotlin
Vendored

fun <T : Any?> foo(x: T) {
if (x is String?) {
x.<!INAPPLICABLE_CANDIDATE!>length<!>
if (x != null) {
x.length
}
}
if (x is String) {
x.length
}
}