summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/object/bug-1150906.js
blob: 27403cccfecfd35a8c43c3054bb0a81cb6b25a79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function f(x) {
    Object.defineProperty(arguments, 0, {
        get: function() {}
    });
    return arguments;
}

var obj = f(1);
assertEq(obj[0], undefined);
assertEq(Object.getOwnPropertyDescriptor(obj, 0).set, undefined);
assertThrowsInstanceOf(() => { "use strict"; obj[0] = 1; }, TypeError);

reportCompare(0, 0);