this before super() is a runtime error, not a static one. (#6467)
* Check that super.* is after super() at runtime * "missing super() call in constructor" runtime * "'this' is not allowed before super()" runtime
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
class Bar {
|
||||
test() {}
|
||||
}
|
||||
|
||||
class Foo extends Bar {
|
||||
constructor() {
|
||||
const t = () => super.test()
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
new Foo();
|
||||
Reference in New Issue
Block a user