IR: Fix scope transparency in ReturnableBlockLowering
An IrReturnableBlock introduces a new variable scope and shouldn't be replaced with a transparent IrComposite block.
This commit is contained in:
committed by
Alexander Udalov
parent
b93c000250
commit
6f0ff6aeb0
@@ -0,0 +1,10 @@
|
||||
fun box(): String {
|
||||
val a = "OK"
|
||||
|
||||
val c = {
|
||||
val b = a
|
||||
b
|
||||
}.invoke()
|
||||
|
||||
return a
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fun box(): String {
|
||||
val a = "OK"
|
||||
|
||||
val c = (fun(): String {
|
||||
val b = a
|
||||
return b
|
||||
}).invoke()
|
||||
|
||||
return a
|
||||
}
|
||||
Reference in New Issue
Block a user