mirror of
https://github.com/MorizzG/MLox.git
synced 2025-12-06 12:32:41 +00:00
20 lines
299 B
Lox
20 lines
299 B
Lox
|
|
class Outer {
|
||
|
|
method() {
|
||
|
|
print this; // expect: Outer instance
|
||
|
|
|
||
|
|
fun f() {
|
||
|
|
print this; // expect: Outer instance
|
||
|
|
|
||
|
|
class Inner {
|
||
|
|
method() {
|
||
|
|
print this; // expect: Inner instance
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
Inner().method();
|
||
|
|
}
|
||
|
|
f();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
Outer().method();
|