Files
kotlin/compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedValInLambdaInitializedOutside.kt
Alexander Udalov 66e19b13ce IR: create shared variables for val-variables when needed
This is possible when a lambda's contract guarantees initialization of a
variable.
2019-11-07 15:20:34 +01:00

11 lines
114 B
Kotlin
Vendored

fun box(): String {
val x: String
x = "OK"
{
val y = x
}()
return x
}
// 0 ObjectRef