summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testUndefinedPropertyAccess.js
blob: 3828f326c56302048c6457b63bf139714b67fde4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function testUndefinedPropertyAccess() {
    var x = [1,2,3];
    var y = {};
    var a = { foo: 1 };
    y.__proto__ = x;
    var z = [x, x, x, y, y, y, y, a, a, a];
    var s = "";
    for (var i = 0; i < z.length; ++i)
        s += z[i].foo;
    return s;
}
assertEq(testUndefinedPropertyAccess(), "undefinedundefinedundefinedundefinedundefinedundefinedundefined111");