Skip to content

Commit

Permalink
Normative: Don't apply early error rules for ObjectLiteral when initi…
Browse files Browse the repository at this point in the history
…ally parsing a CoverCallExpressionAndAsyncArrowHead

This needed to support `async({a = 0}) => {}` and `async({__proto__: a, __proto__: b}) => {}`.
  • Loading branch information
anba authored and bterlson committed Feb 4, 2017
1 parent 2f2d63a commit 993e8e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -11329,7 +11329,7 @@ <h1>Static Semantics: Early Errors</h1>
It is a Syntax Error if HasDirectSuper of |MethodDefinition| is *true*.
</li>
</ul>
<p>In addition to describing an actual object initializer the |ObjectLiteral| productions are also used as a cover grammar for |ObjectAssignmentPattern| and may be recognized as part of a |CoverParenthesizedExpressionAndArrowParameterList|. When |ObjectLiteral| appears in a context where |ObjectAssignmentPattern| is required the following Early Error rules are <b>not</b> applied. In addition, they are not applied when initially parsing a |CoverParenthesizedExpressionAndArrowParameterList|.</p>
<p>In addition to describing an actual object initializer the |ObjectLiteral| productions are also used as a cover grammar for |ObjectAssignmentPattern| and may be recognized as part of a |CoverParenthesizedExpressionAndArrowParameterList|. When |ObjectLiteral| appears in a context where |ObjectAssignmentPattern| is required the following Early Error rules are <b>not</b> applied. In addition, they are not applied when initially parsing a |CoverParenthesizedExpressionAndArrowParameterList| or |CoverCallExpressionAndAsyncArrowHead|.</p>
<emu-grammar>PropertyDefinition : CoverInitializedName</emu-grammar>
<ul>
<li>
Expand Down Expand Up @@ -38609,7 +38609,7 @@ <h1>Other Additional Features</h1>
<!-- es6num="B.3.1" -->
<emu-annex id="sec-__proto__-property-names-in-object-initializers">
<h1>__proto__ Property Names in Object Initializers</h1>
<p>The following Early Error rule is added to those in <emu-xref href="#sec-object-initializer-static-semantics-early-errors"></emu-xref>. When |ObjectLiteral| appears in a context where |ObjectAssignmentPattern| is required the Early Error rule is <b>not</b> applied. In addition, it is not applied when initially parsing a |CoverParenthesizedExpressionAndArrowParameterList|.</p>
<p>The following Early Error rule is added to those in <emu-xref href="#sec-object-initializer-static-semantics-early-errors"></emu-xref>. When |ObjectLiteral| appears in a context where |ObjectAssignmentPattern| is required the Early Error rule is <b>not</b> applied. In addition, it is not applied when initially parsing a |CoverParenthesizedExpressionAndArrowParameterList| or a |CoverCallExpressionAndAsyncArrowHead|.</p>
<emu-grammar>
ObjectLiteral : `{` PropertyDefinitionList `}`

Expand Down

0 comments on commit 993e8e4

Please sign in to comment.