summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/Array-of-nonconfigurable-1.js
blob: d516a1a40c894c0176cd60f0ac0e47f2fac943c4 (plain)
1
2
3
4
5
6
7
8
// If Array.of tries to overwrite a non-configurable property, it throws a TypeError.

load(libdir + "asserts.js");

function C() {
    Object.defineProperty(this, 0, {value: "v", configurable: false});
}
assertThrowsInstanceOf(() => Array.of.call(C, 1, 2, 3), TypeError);