mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-15 16:18:04 +01:00
28 lines
408 B
Plaintext
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
|