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>
26 lines
488 B
TypeScript
26 lines
488 B
TypeScript
//// [computedPropertyNames52.js]
|
|
const array = [];
|
|
for (let i = 0; i < 10; ++i) {
|
|
array.push(class C {
|
|
[i] = () => C;
|
|
static [i] = 100;
|
|
})
|
|
}
|
|
|
|
|
|
//// [computedPropertyNames52-emit.js]
|
|
var _a;
|
|
const array = [];
|
|
for (let i = 0; i < 10; ++i) {
|
|
let _b, _c;
|
|
array.push((_c = class C {
|
|
constructor() {
|
|
this[_b] = () => C;
|
|
}
|
|
},
|
|
_b = i,
|
|
_a = i,
|
|
_c[_a] = 100,
|
|
_c));
|
|
}
|