mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-15 08:08:03 +01:00
14 lines
431 B
Plaintext
14 lines
431 B
Plaintext
class Foo {
|
|
construct new() {}
|
|
def bar { "on instance" }
|
|
static def bar { "on metaclass" }
|
|
|
|
def bar(arg) { "on instance %(arg)" }
|
|
static def bar(arg) { "on metaclass %(arg)" }
|
|
}
|
|
|
|
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
|