|
| 1 | +=== tests/cases/compiler/superPropertyAccess_ES6.ts === |
| 2 | + |
| 3 | +class MyBase { |
| 4 | +>MyBase : Symbol(MyBase, Decl(superPropertyAccess_ES6.ts, 0, 0)) |
| 5 | + |
| 6 | + getValue(): number { return 1; } |
| 7 | +>getValue : Symbol(getValue, Decl(superPropertyAccess_ES6.ts, 1, 14)) |
| 8 | + |
| 9 | + get value(): number { return 1; } |
| 10 | +>value : Symbol(value, Decl(superPropertyAccess_ES6.ts, 2, 34)) |
| 11 | +} |
| 12 | + |
| 13 | +class MyDerived extends MyBase { |
| 14 | +>MyDerived : Symbol(MyDerived, Decl(superPropertyAccess_ES6.ts, 4, 1)) |
| 15 | +>MyBase : Symbol(MyBase, Decl(superPropertyAccess_ES6.ts, 0, 0)) |
| 16 | + |
| 17 | + constructor() { |
| 18 | + super(); |
| 19 | +>super : Symbol(MyBase, Decl(superPropertyAccess_ES6.ts, 0, 0)) |
| 20 | + |
| 21 | + const f1 = super.getValue(); |
| 22 | +>f1 : Symbol(f1, Decl(superPropertyAccess_ES6.ts, 10, 9)) |
| 23 | +>super.getValue : Symbol(MyBase.getValue, Decl(superPropertyAccess_ES6.ts, 1, 14)) |
| 24 | +>super : Symbol(MyBase, Decl(superPropertyAccess_ES6.ts, 0, 0)) |
| 25 | +>getValue : Symbol(MyBase.getValue, Decl(superPropertyAccess_ES6.ts, 1, 14)) |
| 26 | + |
| 27 | + const f2 = super.value; |
| 28 | +>f2 : Symbol(f2, Decl(superPropertyAccess_ES6.ts, 11, 9)) |
| 29 | +>super.value : Symbol(MyBase.value, Decl(superPropertyAccess_ES6.ts, 2, 34)) |
| 30 | +>super : Symbol(MyBase, Decl(superPropertyAccess_ES6.ts, 0, 0)) |
| 31 | +>value : Symbol(MyBase.value, Decl(superPropertyAccess_ES6.ts, 2, 34)) |
| 32 | + } |
| 33 | +} |
| 34 | + |
| 35 | +var d = new MyDerived(); |
| 36 | +>d : Symbol(d, Decl(superPropertyAccess_ES6.ts, 15, 3)) |
| 37 | +>MyDerived : Symbol(MyDerived, Decl(superPropertyAccess_ES6.ts, 4, 1)) |
| 38 | + |
| 39 | +var f3 = d.value; |
| 40 | +>f3 : Symbol(f3, Decl(superPropertyAccess_ES6.ts, 16, 3)) |
| 41 | +>d.value : Symbol(MyBase.value, Decl(superPropertyAccess_ES6.ts, 2, 34)) |
| 42 | +>d : Symbol(d, Decl(superPropertyAccess_ES6.ts, 15, 3)) |
| 43 | +>value : Symbol(MyBase.value, Decl(superPropertyAccess_ES6.ts, 2, 34)) |
| 44 | + |
| 45 | +class A { |
| 46 | +>A : Symbol(A, Decl(superPropertyAccess_ES6.ts, 16, 17)) |
| 47 | + |
| 48 | + private _property: string; |
| 49 | +>_property : Symbol(_property, Decl(superPropertyAccess_ES6.ts, 18, 9)) |
| 50 | + |
| 51 | + get property() { return this._property; } |
| 52 | +>property : Symbol(property, Decl(superPropertyAccess_ES6.ts, 19, 30), Decl(superPropertyAccess_ES6.ts, 20, 45)) |
| 53 | +>this._property : Symbol(_property, Decl(superPropertyAccess_ES6.ts, 18, 9)) |
| 54 | +>this : Symbol(A, Decl(superPropertyAccess_ES6.ts, 16, 17)) |
| 55 | +>_property : Symbol(_property, Decl(superPropertyAccess_ES6.ts, 18, 9)) |
| 56 | + |
| 57 | + set property(value: string) { this._property = value } |
| 58 | +>property : Symbol(property, Decl(superPropertyAccess_ES6.ts, 19, 30), Decl(superPropertyAccess_ES6.ts, 20, 45)) |
| 59 | +>value : Symbol(value, Decl(superPropertyAccess_ES6.ts, 21, 17)) |
| 60 | +>this._property : Symbol(_property, Decl(superPropertyAccess_ES6.ts, 18, 9)) |
| 61 | +>this : Symbol(A, Decl(superPropertyAccess_ES6.ts, 16, 17)) |
| 62 | +>_property : Symbol(_property, Decl(superPropertyAccess_ES6.ts, 18, 9)) |
| 63 | +>value : Symbol(value, Decl(superPropertyAccess_ES6.ts, 21, 17)) |
| 64 | +} |
| 65 | + |
| 66 | +class B extends A { |
| 67 | +>B : Symbol(B, Decl(superPropertyAccess_ES6.ts, 22, 1)) |
| 68 | +>A : Symbol(A, Decl(superPropertyAccess_ES6.ts, 16, 17)) |
| 69 | + |
| 70 | + set property(value: string) { |
| 71 | +>property : Symbol(property, Decl(superPropertyAccess_ES6.ts, 24, 19)) |
| 72 | +>value : Symbol(value, Decl(superPropertyAccess_ES6.ts, 25, 17)) |
| 73 | + |
| 74 | + super.property = value + " addition"; |
| 75 | +>super.property : Symbol(A.property, Decl(superPropertyAccess_ES6.ts, 19, 30), Decl(superPropertyAccess_ES6.ts, 20, 45)) |
| 76 | +>super : Symbol(A, Decl(superPropertyAccess_ES6.ts, 16, 17)) |
| 77 | +>property : Symbol(A.property, Decl(superPropertyAccess_ES6.ts, 19, 30), Decl(superPropertyAccess_ES6.ts, 20, 45)) |
| 78 | +>value : Symbol(value, Decl(superPropertyAccess_ES6.ts, 25, 17)) |
| 79 | + } |
| 80 | +} |
0 commit comments