Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/nullability/smartCastRefinedClass.kt
T
2015-10-14 20:39:35 +03:00

14 lines
281 B
Kotlin
Vendored

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