Skip to content

Commit 9e17021

Browse files
committed
Move the early error rule for ObjectLiteral
1 parent 8d2685f commit 9e17021

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
@@ -18637,6 +18637,19 @@ <h2>Syntax</h2>
1863718637

1863818638
<emu-clause id="sec-object-initializer-static-semantics-early-errors" oldids="sec-__proto__-property-names-in-object-initializers">
1863918639
<h1>Static Semantics: Early Errors</h1>
18640+
<emu-grammar>
18641+
ObjectLiteral :
18642+
`{` PropertyDefinitionList `}`
18643+
`{` PropertyDefinitionList `,` `}`
18644+
</emu-grammar>
18645+
<ul>
18646+
<li>
18647+
It is a Syntax Error if the 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 ParseJSON (see step <emu-xref href="#step-json-parse-parse"></emu-xref> of ParseJSON).
18648+
</li>
18649+
</ul>
18650+
<emu-note>
18651+
<p>The List returned by PropertyNameList does not include property names defined using a |ComputedPropertyName|.</p>
18652+
</emu-note>
1864018653
<emu-grammar>PropertyDefinition : MethodDefinition</emu-grammar>
1864118654
<ul>
1864218655
<li>
@@ -18655,19 +18668,6 @@ <h1>Static Semantics: Early Errors</h1>
1865518668
<emu-note>
1865618669
<p>This production exists so that |ObjectLiteral| can serve as a cover grammar for |ObjectAssignmentPattern|. It cannot occur in an actual object initializer.</p>
1865718670
</emu-note>
18658-
<emu-grammar>
18659-
ObjectLiteral :
18660-
`{` PropertyDefinitionList `}`
18661-
`{` PropertyDefinitionList `,` `}`
18662-
</emu-grammar>
18663-
<ul>
18664-
<li>
18665-
It is a Syntax Error if the 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 ParseJSON (see step <emu-xref href="#step-json-parse-parse"></emu-xref> of ParseJSON).
18666-
</li>
18667-
</ul>
18668-
<emu-note>
18669-
<p>The List returned by PropertyNameList does not include property names defined using a |ComputedPropertyName|.</p>
18670-
</emu-note>
1867118671
</emu-clause>
1867218672

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

0 commit comments

Comments
 (0)