Files
wren/test/for/close_over_loop_variable.wren
2014-04-02 19:41:53 -07:00

11 lines
138 B
Plaintext

var list = []
for (i in [1, 2, 3]) {
list.add(new Fn { IO.print(i) })
}
for (f in list) f.call
// expect: 1
// expect: 2
// expect: 3