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

17 lines
222 B
Plaintext
Raw Normal View History

var Global = "global"
2013-12-04 07:43:50 -08:00
class Foo {
2015-09-01 08:16:04 -07:00
construct new() {}
2013-12-04 07:43:50 -08:00
method {
2015-09-15 07:46:09 -07:00
System.print(Global)
2013-12-04 07:43:50 -08:00
}
static classMethod {
2015-09-15 07:46:09 -07:00
System.print(Global)
2013-12-04 07:43:50 -08:00
}
}
2015-07-10 09:18:22 -07:00
Foo.new().method // expect: global
2013-12-04 07:43:50 -08:00
Foo.classMethod // expect: global