Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/varnotnull/leakingLambdaInCalledInPlace.kt
T

12 lines
193 B
Kotlin
Vendored

// FIR_IDENTICAL
fun main() {
var p: String?
var block: () -> Int = { 1 }
p = "2"
run {
block = { <!SMARTCAST_IMPOSSIBLE!>p<!>.length }
}
p = null
block()
}