summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug839420.js
blob: 66b2c87ef8e107a24d5a4d336a501e755df5a686 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function f() {
    var x = undefined;
    try {
	[1, 2, 3].map(x);
	assertEq(0, 1);
    } catch(e) {
	assertEq(e.toString().includes("x is not"), true);
    }

    try {
	[1, 2, 3].filter(x, 1, 2);
	assertEq(0, 1);
    } catch(e) {
	assertEq(e.toString().includes("x is not"), true);
    }
}
f();