Files
wren/test/language/method/static.wren

13 lines
378 B
Plaintext
Raw Normal View History

2013-11-10 11:46:13 -08:00
class Foo {
bar { "on instance" }
static bar { "on metaclass" }
2013-11-10 11:46:13 -08:00
bar(arg) { "on instance " + arg }
static bar(arg) { "on metaclass " + arg }
2013-11-10 11:46:13 -08:00
}
IO.print(Foo.new().bar) // expect: on instance
IO.print(Foo.bar) // expect: on metaclass
IO.print(Foo.new().bar("arg")) // expect: on instance arg
IO.print(Foo.bar("arg")) // expect: on metaclass arg