summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testDeepPropertyShadowing.js
blob: 65dbf8d5eb891463338704f7200afa5d0e058839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function testDeepPropertyShadowing()
{
    function h(node) {
        var x = 0;
        while (node) {
            x++;
            node = node.parent;
        }
        return x;
    }
    var tree = {__proto__: {__proto__: {parent: null}}};
    h(tree);
    h(tree);
    tree.parent = {};
    assertEq(h(tree), 2);
}
testDeepPropertyShadowing();