summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/bug1669415.js
blob: e22497f86d91254da7938430d8651f1847968e4e (plain)
1
2
3
4
5
6
7
8
9
10
11
function f(x, y) {
    return +(-y ? -x : (y ? x : NaN));
}
let arr = [false, {}, {}];
for (let i = 0; i < 9; ++i) {
    f(1.1, 2);
}
for (let i = 0; i < arr.length; i++) {
    output = f(true, arr[i]);
}
assertEq(output, 1);