b2d1f537f1
* Fix property name bindings for class expr in loops * Fix block-scope capturing with prop initializers Co-authored-by: Joey Watts <joey.watts.96@gmail.com>
30 lines
551 B
Plaintext
30 lines
551 B
Plaintext
=== tests/cases/conformance/classes/classExpressions/classExpressionLoop.ts ===
|
|
let arr = [];
|
|
>arr : any[]
|
|
>[] : undefined[]
|
|
|
|
for (let i = 0; i < 10; ++i) {
|
|
>i : number
|
|
>0 : 0
|
|
>i < 10 : boolean
|
|
>i : number
|
|
>10 : 10
|
|
>++i : number
|
|
>i : number
|
|
|
|
arr.push(class C {
|
|
>arr.push(class C { prop = i; }) : number
|
|
>arr.push : (...items: any[]) => number
|
|
>arr : any[]
|
|
>push : (...items: any[]) => number
|
|
>class C { prop = i; } : typeof C
|
|
>C : typeof C
|
|
|
|
prop = i;
|
|
>prop : number
|
|
>i : number
|
|
|
|
});
|
|
}
|
|
|