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

14 lines
415 B
Plaintext
Raw Permalink Normal View History

2013-11-10 11:46:13 -08:00
class Foo {
construct new() {}
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
}
System.print(Foo.new().bar) // expect: on instance
System.print(Foo.bar) // expect: on metaclass
System.print(Foo.new().bar("arg")) // expect: on instance arg
System.print(Foo.bar("arg")) // expect: on metaclass arg