Fix scoping and break statements.
Variables declared in the loop were not properly disposed of when you broke out of the loop.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
var f
|
||||
for (i in [1, 2, 3]) {
|
||||
var j = 4
|
||||
f = fn IO.print(i + j)
|
||||
break
|
||||
}
|
||||
|
||||
f.call
|
||||
// expect: 5
|
||||
Reference in New Issue
Block a user