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
+18
@@ -0,0 +1,18 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Host(var value: String) {
|
||||
operator fun get(i: Int, j: Int, k: Int) = value
|
||||
|
||||
operator fun set(i: Int, j: Int, k: Int, newValue: String) {
|
||||
value = newValue
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var x = Host("")
|
||||
run {
|
||||
x[0, 0, 0] += "O"
|
||||
x[0, 0, 0] += "K"
|
||||
}
|
||||
return x.value
|
||||
}
|
||||
Reference in New Issue
Block a user