packages/babel-plugin-transform-classes/test/fixtures/regression/5769/input.js
raw| 1 | class Point { |
| 2 | getX() { |
| 3 | expect(this.x).toBe(3); // C |
| 4 | } |
| 5 | } |
| 6 | |
| 7 | class ColorPoint extends Point { |
| 8 | constructor() { |
| 9 | super(); |
| 10 | this.x = 2; |
| 11 | super.x = 3; |
| 12 | expect(this.x).toBe(3); // A |
| 13 | expect(super.x).toBeUndefined(); // B |
| 14 | } |
| 15 | |
| 16 | m() { |
| 17 | this.getX(); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | const cp = new ColorPoint(); |
| 22 | cp.m(); |