mirror of
https://github.com/MorizzG/rlox.git
synced 2025-12-06 12:22:42 +00:00
13 lines
210 B
Lox
13 lines
210 B
Lox
class Base {
|
|
foo(a, b) {
|
|
print "Base.foo(" + a + ", " + b + ")";
|
|
}
|
|
}
|
|
|
|
class Derived < Base {
|
|
foo() {
|
|
super.foo(1); // expect runtime error: Expected 2 arguments but got 1.
|
|
}
|
|
}
|
|
|
|
Derived().foo();
|