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

16 lines
241 B
Kotlin
Vendored

// !LANGUAGE: -CapturedInClosureSmartCasts
fun run(f: () -> Unit) = f()
fun foo(s: String?) {
var x: String? = null
if (s != null) {
x = s
}
if (x != null) {
run {
x.hashCode()
}
}
}