Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/undefined/15.1.1.3-2.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es5id: 15.1.1.3-2
6 es6id: 18.1.3
7 esid: sec-undefined
8 description: undefined is not writable, should throw TypeError in strict mode
9 flags: [onlyStrict]
10 ---*/
11
12 var global = this;
13
14 assert.throws(TypeError, function() {
15 global["undefined"] = 5; // Should throw a TypeError as per 8.12.5
16 });
17 assert.sameValue(global["undefined"], void 0);
18 assert.sameValue(undefined, void 0);