Files
wren/test/language/nonlocal/assignment.wren
T

19 lines
312 B
Plaintext
Raw Normal View History

var Nonlocal = "before"
2015-09-15 07:46:09 -07:00
System.print(Nonlocal) // expect: before
Nonlocal = "after"
2015-09-15 07:46:09 -07:00
System.print(Nonlocal) // expect: after
class Foo {
static method {
Nonlocal = "method"
}
}
Foo.method
2015-09-15 07:46:09 -07:00
System.print(Nonlocal) // expect: method
2015-07-10 09:18:22 -07:00
Fn.new {
Nonlocal = "fn"
2015-02-26 23:08:36 -08:00
}.call()
2015-09-15 07:46:09 -07:00
System.print(Nonlocal) // expect: fn