__proto__-value-obj.js (879B)
1 // Copyright (C) 2015 André Bargull. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-__proto__-property-names-in-object-initializers 5 es6id: B.3.1 6 description: > 7 The value of the `__proto__` property key is assigned to the [[Prototype]] 8 internal slot (Object value) 9 info: | 10 __proto__ Property Names in Object Initializers 11 12 ... 13 6. If propKey is the String value "__proto__" and if IsComputedPropertyKey(propKey) is false, then 14 a. If Type(propValue) is either Object or Null, then 15 i. Return object.[[SetPrototypeOf]](propValue). 16 b. Return NormalCompletion(empty). 17 ... 18 ---*/ 19 20 var proto = {}; 21 22 var object = { 23 __proto__: proto 24 }; 25 26 assert.sameValue(Object.getPrototypeOf(object), proto); 27 assert.sameValue( 28 Object.getOwnPropertyDescriptor(object, '__proto__'), undefined 29 ); 30 31 reportCompare(0, 0);