mirror of
https://github.com/MorizzG/rlox.git
synced 2025-12-06 12:22:42 +00:00
22 lines
275 B
Lox
22 lines
275 B
Lox
class Foo {
|
|
inFoo() {
|
|
print "in foo";
|
|
}
|
|
}
|
|
|
|
class Bar < Foo {
|
|
inBar() {
|
|
print "in bar";
|
|
}
|
|
}
|
|
|
|
class Baz < Bar {
|
|
inBaz() {
|
|
print "in baz";
|
|
}
|
|
}
|
|
|
|
var baz = Baz();
|
|
baz.inFoo(); // expect: in foo
|
|
baz.inBar(); // expect: in bar
|
|
baz.inBaz(); // expect: in baz
|