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:
Nicolò Ribaudo
2017-12-06 06:46:54 +01:00
committed by GitHub
parent e270fbe7f0
commit 509dbb7302
66 changed files with 536 additions and 84 deletions

View File

@@ -0,0 +1,12 @@
class Bar {
test() {}
}
class Foo extends Bar {
constructor() {
const t = () => super.test()
super();
}
}
new Foo();