zlox/samples/ch29_superclass2.lox

20 lines
218 B
Plaintext
Raw Normal View History

2024-09-01 11:58:57 +02:00
class A {
method() {
print "A method";
}
}
class B < A {
method() {
print "B method";
}
test() {
this.method();
super.method();
}
}
class C < B {}
C().test();