fix corner case in collapse_vars (#5505)

fixes #5504
This commit is contained in:
Alex Lam S.L
2022-06-10 02:12:59 +01:00
committed by GitHub
parent 25017978e7
commit 053cb27fe3
2 changed files with 23 additions and 1 deletions

View File

@@ -3179,3 +3179,25 @@ issue_5502: {
expect_stdout: "PASS 42"
node_version: ">=12"
}
issue_5504: {
options = {
collapse_vars: true,
}
input: {
"use strict";
var a;
console.log((a = 42, class {
static p;
}).p);
}
expect: {
"use strict";
var a;
console.log((a = 42, class {
static p;
}).p);
}
expect_stdout: "undefined"
node_version: ">=12"
}