summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testUndefinedIncrement.js
blob: a42557b3b73a311ade6a8895dfd23293b1fbe58e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function f() {
    var n;
    var k;
    for (var i = 0; i < 18; ++i) {
	n = undefined;
	k = n++;
	if (k) { }
    }
    return [k, n];
}

var [a, b] = f();

assertEq(isNaN(a), true);
assertEq(isNaN(b), true);