fix corner case in sign propagation (#3696)
- migrate de-facto functionality to `evaluate` fixes #3695
This commit is contained in:
@@ -669,6 +669,9 @@ issue_1710: {
|
||||
}
|
||||
|
||||
unary_binary_parenthesis: {
|
||||
options = {
|
||||
evaluate: true,
|
||||
}
|
||||
input: {
|
||||
var v = [ 0, 1, NaN, Infinity, null, undefined, true, false, "", "foo", /foo/ ];
|
||||
v.forEach(function(x) {
|
||||
@@ -1233,3 +1236,18 @@ issue_3684: {
|
||||
"Infinity",
|
||||
]
|
||||
}
|
||||
|
||||
issue_3695: {
|
||||
options = {
|
||||
evaluate: true,
|
||||
}
|
||||
input: {
|
||||
var a = [];
|
||||
console.log(+(a * (a[0] = false)));
|
||||
}
|
||||
expect: {
|
||||
var a = [];
|
||||
console.log(+(a * (a[0] = false)));
|
||||
}
|
||||
expect_stdout: "NaN"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user