if a shared variable is a result of the block, release it only after it has been put
#KT-2151 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
fun foo(): String {
|
||||
return if (true) {
|
||||
var x = "OK"
|
||||
fun foo() { x += "fail" }
|
||||
x
|
||||
} else "fail"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return foo()
|
||||
}
|
||||
Reference in New Issue
Block a user