mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* [static blocks] Do not inject new static fields after static code * Update fixtures * Less parentheses * Avoid temp variable * Preserve class name * Fix Babel 8 * Fix ts * fix ts again * harden new-target test * Fix old Babel 7 compat --------- Co-authored-by: Huáng Jùnliàng <[email protected]>
19 lines
212 B
JavaScript
19 lines
212 B
JavaScript
let res = [];
|
|
let foo = 1;
|
|
class A {
|
|
static {
|
|
var foo = 3;
|
|
}
|
|
static {
|
|
res.push(foo);
|
|
}
|
|
static x;
|
|
static {
|
|
var foo = 4;
|
|
}
|
|
static {
|
|
res.push(foo);
|
|
}
|
|
}
|
|
expect(res).toEqual([1, 1]);
|