swc/crates/swc_ecma_parser/tests/tsc/thisAndSuperInStaticMembers4.ts
2022-02-04 17:08:38 +09:00

26 lines
512 B
TypeScript

// @target: es5
// @useDefineForClassFields: false
// @noTypesAndSymbols: true
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 z3 = super.f();
static z4 = super["f"]();
// these should be unaffected
x = 1;
y = this.x;
z = super.f();
}