Fix super nested class bugs (#7691)

* Properly traverse nested class for supers

* Add object nested in class cases

* Add object nested object cases

* Test class properties

* Undo changes to lerna.json

* Add tests arournd prefix/postfix super increment

* tmp

* Use sets
This commit is contained in:
Justin Ridgewell
2018-04-12 13:02:26 -04:00
committed by GitHub
parent af3d6526e7
commit ecbf0dd53c
37 changed files with 907 additions and 169 deletions

View File

@@ -9,12 +9,12 @@ class ColorPoint extends Point {
super();
this.x = 2;
super.x = 3;
assert.equal(this.x, 3) // A
assert.equal(super.x, undefined) // B
assert.equal(this.x, 3); // A
assert.equal(super.x, undefined); // B
}
m() {
this.getX()
this.getX();
}
}

View File

@@ -29,7 +29,7 @@ function (_Point) {
babelHelpers.classCallCheck(this, ColorPoint);
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(ColorPoint).call(this));
_this.x = 2;
babelHelpers.set(babelHelpers.getPrototypeOf(ColorPoint.prototype), "x", 3, _this, true);
babelHelpers.set(babelHelpers.getPrototypeOf(ColorPoint.prototype), "x", 3, _this, true)
assert.equal(_this.x, 3); // A
assert.equal(babelHelpers.get(babelHelpers.getPrototypeOf(ColorPoint.prototype), "x", babelHelpers.assertThisInitialized(_this)), undefined); // B