summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/Array-of-nonconfigurable-2.js
blob: f5c783714aa310d5aeaad56a27303ffafdf37d89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Array.of does not overwrite non-configurable properties.

load(libdir + "asserts.js");

var obj;
function C() {
    obj = this;
    Object.defineProperty(this, 0, {value: "v", configurable: false});
}
try { Array.of.call(C, 1); } catch (e) {}
assertDeepEq(Object.getOwnPropertyDescriptor(obj, 0), {
    value: "v",
    writable: false,
    enumerable: false,
    configurable: false
});