fix corner case in booleans (#4246)

fixes #4245
This commit is contained in:
Alex Lam S.L
2020-10-26 10:53:58 +00:00
committed by GitHub
parent b2775746a7
commit 607f87c5cd
4 changed files with 47 additions and 2 deletions

View File

@@ -893,3 +893,26 @@ issue_4231: {
expect_stdout: "function"
node_version: ">=4"
}
issue_4245: {
options = {
booleans: true,
}
input: {
"use strict";
let a = f();
function f() {
typeof a;
}
}
expect: {
"use strict";
let a = f();
function f() {
a,
1;
}
}
expect_stdout: ReferenceError("a is not defined")
node_version: ">=4"
}