Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/nullability/smartCastRefinedClass.kt
T
2017-04-05 21:35:09 +03:00

14 lines
252 B
Kotlin
Vendored

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