KT-5248 Don't wrap variable if it is captured only in inlined closures
Remove non-escaping Ref's on bytecode postprocessing pass.
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box(): String {
|
||||
run {
|
||||
run {
|
||||
var x = 0
|
||||
run { ++x }
|
||||
if (x == 0) return "fail"
|
||||
}
|
||||
|
||||
run {
|
||||
var x = 0
|
||||
run { x++ }
|
||||
if (x == 0) return "fail"
|
||||
}
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user