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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user