Files
wren/test/closure/use_global_in_method.wren
T

16 lines
249 B
Plaintext
Raw Normal View History

2013-12-04 07:43:50 -08:00
var global = "global"
// TODO: Forward reference to global declared after use.
2013-12-04 07:43:50 -08:00
class Foo {
method {
2014-01-05 12:27:12 -08:00
IO.print(global)
2013-12-04 07:43:50 -08:00
}
static classMethod {
2014-01-05 12:27:12 -08:00
IO.print(global)
2013-12-04 07:43:50 -08:00
}
}
(new Foo).method // expect: global
2013-12-04 07:43:50 -08:00
Foo.classMethod // expect: global