Files
scriptc/tests/corpus/js-class-added-parameters.js
Chris Tate f818e8fb89 Extend static three.js support to raycasting
- Compile mesh, line, and point picking with perspective and orthographic camera rays.
- Preserve JavaScript override arguments, array identity, and native subclass values across checked calls.
- Specialize package class helpers and handle unsupported JSDoc namepaths.
2026-09-30 00:35:35 -05:00

23 lines
728 B
JavaScript

class Base {
visit() { console.log("base"); }
dispatch(first, second, third) { this.visit(first, second, third); }
}
class Pair extends Base {
visit(first, second) { console.log("pair", first, second); }
}
class Triple extends Pair {
visit(first, second, third) { console.log("triple", first, second, third); }
parent(first, second) { super.visit(first, second); }
}
class Short extends Base {
visit(first) { console.log("short", first); }
}
function value(n) { console.log("arg", n); return n; }
for (const object of [new Base(), new Pair(), new Triple(), new Short()]) {
object.dispatch(value(1), value(2), value(3));
object.visit();
}
new Triple().parent(4, 5);
const method = new Pair().visit;
method(6, 7);