mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
21 lines
364 B
JavaScript
21 lines
364 B
JavaScript
class Class1 {
|
|
constructor(x) { this.x = x; }
|
|
}
|
|
new Class1(42, 23); // $ Alert - `23` is ignored
|
|
|
|
class Sup {
|
|
constructor(x) { this.x = x; }
|
|
}
|
|
|
|
class Sub extends Sup {
|
|
}
|
|
|
|
new Sub(42); // OK - synthetic constructor delegates to super constructor
|
|
|
|
class Other {}
|
|
|
|
new Other(42); // $ Alert - `42` is ignored
|
|
|
|
var args = [];
|
|
f(...args);
|
|
f(42, ...args); // $ Alert
|