Replace superIdentifier with superProperty.
This also disallows the usage of bare `super` that is not part of a member expression, call expression, or new expression.
This commit is contained in:
@@ -3,7 +3,6 @@ class Test extends Foo {
|
||||
woops.super.test();
|
||||
super();
|
||||
super.test();
|
||||
foob(super);
|
||||
|
||||
super(...arguments);
|
||||
super("test", ...arguments);
|
||||
|
||||
@@ -45,7 +45,6 @@ var Test = (function () {
|
||||
woops["super"].test();
|
||||
_get(Object.getPrototypeOf(Test.prototype), "constructor", this).call(this);
|
||||
_get(Object.getPrototypeOf(Test.prototype), "test", this).call(this);
|
||||
foob(_Foo);
|
||||
|
||||
(_get2 = _get(Object.getPrototypeOf(Test.prototype), "constructor", this)).call.apply(_get2, [this].concat(_slice.call(arguments)));
|
||||
(_get3 = _get(Object.getPrototypeOf(Test.prototype), "constructor", this)).call.apply(_get3, [this, "test"].concat(_slice.call(arguments)));
|
||||
|
||||
5
test/fixtures/transformation/es6-classes/bare-super/actual.js
vendored
Normal file
5
test/fixtures/transformation/es6-classes/bare-super/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
class Test {
|
||||
constructor() {
|
||||
console.log(super);
|
||||
}
|
||||
}
|
||||
3
test/fixtures/transformation/es6-classes/bare-super/options.json
vendored
Normal file
3
test/fixtures/transformation/es6-classes/bare-super/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "illegal use of bare super"
|
||||
}
|
||||
Reference in New Issue
Block a user