mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
Co-authored-by: Nicolò Ribaudo <[email protected]> Co-authored-by: Justin Ridgewell <[email protected]>
24 lines
621 B
JavaScript
24 lines
621 B
JavaScript
var log = [];
|
|
|
|
function push(x, y = x) { log.push(x); return y; }
|
|
|
|
class C {
|
|
static get a() { push(1) }
|
|
static get b() { push(6) }
|
|
static get c() { push(10) }
|
|
static get d() { push(13) }
|
|
static get #x() { push(3) };
|
|
static get #y() { return push(8, C) };
|
|
static get #z() { push(15) }
|
|
static {
|
|
var { [push(0, "a")]: a = push(2), #x: {
|
|
[push(5, "b")]: b = push(7),
|
|
#y: y = push(-1),
|
|
[push(9, "c")]: c = push(11)
|
|
} = push(4, C), [push(12, "d")]: d = push(14), #z: z = push(16), ...f } = C;
|
|
}
|
|
}
|
|
|
|
var nums = Array.from({ length: 17 }, (_, i) => i);
|
|
expect(log).toStrictEqual(nums);
|