Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/varnotnull/initialization.kt
T
2017-11-29 02:54:26 +03:00

8 lines
229 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
fun foo() {
var v: String? = "xyz"
// It is possible in principle to provide smart cast here
v<!UNSAFE_CALL!>.<!>length
v = null
<!OI;DEBUG_INFO_CONSTANT!>v<!><!UNSAFE_CALL!>.<!>length
}