* Check that super.* is after super() at runtime * "missing super() call in constructor" runtime * "'this' is not allowed before super()" runtime
11 lines
130 B
JavaScript
11 lines
130 B
JavaScript
class Bar {}
|
|
|
|
class Foo extends Bar {
|
|
constructor() {
|
|
this.foo = "bar";
|
|
super();
|
|
}
|
|
}
|
|
|
|
assert.throws(() => new Foo());
|