Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/smartcasts/withChangesToNull.kt
T

11 lines
259 B
Kotlin
Vendored

fun foo(y: String?) {
var x: String? = ""
if (x != null) {
with(y?.let { x = null; it }) {
this<!UNSAFE_CALL!>.<!>length
<!SMARTCAST_IMPOSSIBLE!>x<!>.length
}
<!SMARTCAST_IMPOSSIBLE!>x<!>.length
}
}