Skip to content

Commit d2f6cd1

Browse files
committed
Move the early error rule for ObjectLiteral
1 parent b598519 commit d2f6cd1

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

spec.html

+13-13
Original file line numberDiff line numberDiff line change
@@ -18416,6 +18416,19 @@ <h2>Syntax</h2>
1841618416

1841718417
<emu-clause id="sec-object-initializer-static-semantics-early-errors" oldids="sec-__proto__-property-names-in-object-initializers">
1841818418
<h1>Static Semantics: Early Errors</h1>
18419+
<emu-grammar>
18420+
ObjectLiteral :
18421+
`{` PropertyDefinitionList `}`
18422+
`{` PropertyDefinitionList `,` `}`
18423+
</emu-grammar>
18424+
<ul>
18425+
<li>
18426+
It is a Syntax Error if PropertyNameList of |PropertyDefinitionList| contains any duplicate entries for *"__proto__"* and at least two of those entries were obtained from productions of the form <emu-grammar>PropertyDefinition : PropertyName `:` AssignmentExpression</emu-grammar>. This rule is not applied if this |ObjectLiteral| is contained within a |Script| that is being parsed for JSON.parse (see step <emu-xref href="#step-json-parse-parse"></emu-xref> of <emu-xref href="#sec-json.parse">JSON.parse</emu-xref>).
18427+
</li>
18428+
</ul>
18429+
<emu-note>
18430+
<p>The List returned by PropertyNameList does not include property names defined using a |ComputedPropertyName|.</p>
18431+
</emu-note>
1841918432
<emu-grammar>PropertyDefinition : MethodDefinition</emu-grammar>
1842018433
<ul>
1842118434
<li>
@@ -18434,19 +18447,6 @@ <h1>Static Semantics: Early Errors</h1>
1843418447
<emu-note>
1843518448
<p>This production exists so that |ObjectLiteral| can serve as a cover grammar for |ObjectAssignmentPattern|. It cannot occur in an actual object initializer.</p>
1843618449
</emu-note>
18437-
<emu-grammar>
18438-
ObjectLiteral :
18439-
`{` PropertyDefinitionList `}`
18440-
`{` PropertyDefinitionList `,` `}`
18441-
</emu-grammar>
18442-
<ul>
18443-
<li>
18444-
It is a Syntax Error if PropertyNameList of |PropertyDefinitionList| contains any duplicate entries for *"__proto__"* and at least two of those entries were obtained from productions of the form <emu-grammar>PropertyDefinition : PropertyName `:` AssignmentExpression</emu-grammar>. This rule is not applied if this |ObjectLiteral| is contained within a |Script| that is being parsed for JSON.parse (see step <emu-xref href="#step-json-parse-parse"></emu-xref> of <emu-xref href="#sec-json.parse">JSON.parse</emu-xref>).
18445-
</li>
18446-
</ul>
18447-
<emu-note>
18448-
<p>The List returned by PropertyNameList does not include property names defined using a |ComputedPropertyName|.</p>
18449-
</emu-note>
1845018450
</emu-clause>
1845118451

1845218452
<emu-clause id="sec-static-semantics-iscomputedpropertykey" type="sdo">

0 commit comments

Comments
 (0)