Files
wren/test/language/this/nested_class.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

28 lines
408 B
Plaintext

class Outer {
construct new() {}
def method {
System.print(this) // expect: Outer
Fn.new {
System.print(this) // expect: Outer
class Inner {
construct new() {}
def method {
System.print(this) // expect: Inner
}
def toString { "Inner" }
}
Inner.new().method
}.call()
}
def toString { "Outer" }
}
Outer.new().method