Files
wren/test/closure/assign_to_closure.wren
T
Bob Nystrom b979272305 Clean up text handling a bit:
- Rename IO.write -> IO.print.
- Make IO.write not print a newline.
- Support \u Unicode escapes in strings.
2014-01-05 12:27:12 -08:00

26 lines
298 B
Plaintext

var f = null
var g = null
{
var local = "local"
f = fn {
IO.print(local)
local = "after f"
IO.print(local)
}
g = fn {
IO.print(local)
local = "after g"
IO.print(local)
}
}
f.call
// expect: local
// expect: after f
g.call
// expect: after f
// expect: after g