Add a closure test.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
{
|
||||
var foo = "closure"
|
||||
new Fn {
|
||||
{
|
||||
IO.print(foo) // expect: closure
|
||||
var foo = "shadow"
|
||||
IO.print(foo) // expect: shadow
|
||||
}
|
||||
IO.print(foo) // expect: closure
|
||||
}.call
|
||||
}
|
||||
Reference in New Issue
Block a user