summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testArgumentsPropLookup.js
blob: 6e8a4cda75137114f9f219869e8dbaf1453e43c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(function() {
    var s = "__proto__";
    assertEq(arguments[s], Object.prototype);   
})();

Object.defineProperty(Object.prototype, "foo", {
    get:function() {
        this.bar = 42;
        return 41
    }
});

(function() {
    var s = "foo";
    assertEq(arguments[s], 41);
    s = "bar";
    assertEq(arguments[s], 42);
    assertEq("bar" in Object.prototype, false);
})();