* Fix incorrect emit for accessing static property in static propertyDeclaration * Update tests and baselines * Update function name * Fix when accessing static property inside arrow function * Add tests and baselines
43 lines
2 KiB
Plaintext
43 lines
2 KiB
Plaintext
=== tests/cases/compiler/classExpressionWithStaticPropertiesES63.ts ===
|
|
|
|
declare var console: any;
|
|
>console : Symbol(console, Decl(classExpressionWithStaticPropertiesES63.ts, 1, 11))
|
|
|
|
const arr: {y(): number}[] = [];
|
|
>arr : Symbol(arr, Decl(classExpressionWithStaticPropertiesES63.ts, 2, 5))
|
|
>y : Symbol(y, Decl(classExpressionWithStaticPropertiesES63.ts, 2, 12))
|
|
|
|
for (let i = 0; i < 3; i++) {
|
|
>i : Symbol(i, Decl(classExpressionWithStaticPropertiesES63.ts, 3, 8))
|
|
>i : Symbol(i, Decl(classExpressionWithStaticPropertiesES63.ts, 3, 8))
|
|
>i : Symbol(i, Decl(classExpressionWithStaticPropertiesES63.ts, 3, 8))
|
|
|
|
arr.push(class C {
|
|
>arr.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
|
|
>arr : Symbol(arr, Decl(classExpressionWithStaticPropertiesES63.ts, 2, 5))
|
|
>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
|
|
>C : Symbol(C, Decl(classExpressionWithStaticPropertiesES63.ts, 4, 13))
|
|
|
|
static x = i;
|
|
>x : Symbol(C.x, Decl(classExpressionWithStaticPropertiesES63.ts, 4, 22))
|
|
>i : Symbol(i, Decl(classExpressionWithStaticPropertiesES63.ts, 3, 8))
|
|
|
|
static y = () => C.x * 2;
|
|
>y : Symbol(C.y, Decl(classExpressionWithStaticPropertiesES63.ts, 5, 21))
|
|
>C.x : Symbol(C.x, Decl(classExpressionWithStaticPropertiesES63.ts, 4, 22))
|
|
>C : Symbol(C, Decl(classExpressionWithStaticPropertiesES63.ts, 4, 13))
|
|
>x : Symbol(C.x, Decl(classExpressionWithStaticPropertiesES63.ts, 4, 22))
|
|
|
|
});
|
|
}
|
|
arr.forEach(C => console.log(C.y()));
|
|
>arr.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
|
|
>arr : Symbol(arr, Decl(classExpressionWithStaticPropertiesES63.ts, 2, 5))
|
|
>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
|
|
>C : Symbol(C, Decl(classExpressionWithStaticPropertiesES63.ts, 9, 12))
|
|
>console : Symbol(console, Decl(classExpressionWithStaticPropertiesES63.ts, 1, 11))
|
|
>C.y : Symbol(y, Decl(classExpressionWithStaticPropertiesES63.ts, 2, 12))
|
|
>C : Symbol(C, Decl(classExpressionWithStaticPropertiesES63.ts, 9, 12))
|
|
>y : Symbol(y, Decl(classExpressionWithStaticPropertiesES63.ts, 2, 12))
|
|
|