mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-13 07:08:43 +01:00
21 lines
291 B
Plaintext
21 lines
291 B
Plaintext
var foo = "variable"
|
|
|
|
class Foo {
|
|
construct new() {}
|
|
|
|
def foo { "method" }
|
|
|
|
def method {
|
|
System.print(foo)
|
|
}
|
|
|
|
static def foo { "class method" }
|
|
|
|
static def classMethod {
|
|
System.print(foo)
|
|
}
|
|
}
|
|
|
|
Foo.new().method // expect: method
|
|
Foo.classMethod // expect: class method
|