__proto__-duplicate.js (696B)
1 // |reftest| error:SyntaxError 2 // Copyright (C) 2016 the V8 project authors. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 /*--- 5 esid: sec-__proto__-property-names-in-object-initializers 6 es6id: B.3.1 7 description: Duplicate `__proto__` property 8 info: | 9 It is a Syntax Error if PropertyNameList of PropertyDefinitionList contains 10 any duplicate entries for "__proto__" and at least two of those entries 11 were obtained from productions of the form 12 PropertyDefinition : PropertyName : AssignmentExpression . 13 negative: 14 phase: parse 15 type: SyntaxError 16 ---*/ 17 18 $DONOTEVALUATE(); 19 20 ({ 21 __proto__: null, 22 other: null, 23 '__proto__': null 24 });