Files
wren/test/language/variable/outside_method.wren
Bob Nystrom eff4485a56 Clean up definition syntax:
- Don't use "def" on constructors.
- Put "foreign" and "static" before "def".
2015-12-18 06:59:49 -08:00

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