Fix closure's reference to outer closure
#KT-3276 Fixed
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
fun box(): String {
|
||||
fun foo(x: Int) {
|
||||
fun bar(y: Int) {
|
||||
fun baz(z: Int) {
|
||||
foo(x - 1)
|
||||
}
|
||||
|
||||
baz(y)
|
||||
}
|
||||
|
||||
if (x > 0) bar(x)
|
||||
}
|
||||
|
||||
foo(1)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user