1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
//// [thisAndSuperInStaticMembers1.ts]
declare class B {
static a: any;
static f(): number;
a: number;
f(): number;
}
class C extends B {
static x: any = undefined!;
static y1 = this.x;
static y2 = this.x();
static y3 = this?.x();
static y4 = this[("x")]();
static y5 = this?.[("x")]();
static z1 = super.a;
static z2 = super["a"];
static z3 = super.f();
static z4 = super["f"]();
static z5 = super.a = 0;
static z6 = super.a += 1;
static z7 = (() => { super.a = 0; })();
static z8 = [super.a] = [0];
static z9 = [super.a = 0] = [0];
static z10 = [...super.a] = [0];
static z11 = { x: super.a } = { x: 0 };
static z12 = { x: super.a = 0 } = { x: 0 };
static z13 = { ...super.a } = { x: 0 };
static z14 = ++super.a;
static z15 = --super.a;
static z16 = ++super[("a")];
static z17 = super.a++;
static z18 = super.a``;
// these should be unaffected
x = 1;
y = this.x;
z = super.f();
}
//// [thisAndSuperInStaticMembers1.js]
class C extends B {
static x = undefined;
static y1 = this.x;
static y2 = this.x();
static y3 = this?.x();
static y4 = this[("x")]();
static y5 = this?.[("x")]();
static z1 = super.a;
static z2 = super["a"];
static z3 = super.f();
static z4 = super["f"]();
static z5 = super.a = 0;
static z6 = super.a += 1;
static z7 = (() => { super.a = 0; })();
static z8 = [super.a] = [0];
static z9 = [super.a = 0] = [0];
static z10 = [...super.a] = [0];
static z11 = { x: super.a } = { x: 0 };
static z12 = { x: super.a = 0 } = { x: 0 };
static z13 = { ...super.a } = { x: 0 };
static z14 = ++super.a;
static z15 = --super.a;
static z16 = ++super[("a")];
static z17 = super.a++;
static z18 = super.a ``;
// these should be unaffected
x = 1;
y = this.x;
z = super.f();
}
|