convert to number under boolean context (#2545)

This commit is contained in:
Alex Lam S.L
2017-12-01 12:52:36 +08:00
committed by GitHub
parent 5a1e99d713
commit 09b320e8a5
8 changed files with 15 additions and 12 deletions

View File

@@ -44,7 +44,7 @@ typeof_in_boolean_context: {
function f2() { return g(), "Yes"; }
foo();
console.log(1);
var a = !(console.log(2), !0);
var a = !(console.log(2), 1);
foo();
}
}
@@ -57,6 +57,6 @@ issue_1668: {
if (typeof bar);
}
expect: {
if (!0);
if (1);
}
}