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

var [a, b] = f();
assertEq(a, 0);
assertEq(b, 1);