Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Normative: Ban fields named constructor or #constructor
Browse files Browse the repository at this point in the history
Closes #22
  • Loading branch information
littledan committed Jul 18, 2017
1 parent 3a30572 commit e7d009b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,21 @@ <h1>Static Semantics: Early Errors</h1>
<emu-grammar>ClassElement : `static` FieldDefinition `;`</emu-grammar>
<ul>
<li>
It is a Syntax Error if PropName of |FieldDefinition| is `"prototype"`.
It is a Syntax Error if PropName of |FieldDefinition| is `"prototype"` or `"constructor"`.
</li>
</ul>

<emu-grammar>ClassElement : FieldDefinition `;`</emu-grammar>
<ul>
<li>
It is a Syntax Error if PropName of |FieldDefinition| is `"constructor"`.
</li>
</ul>

<emu-grammar>ClassElementName : PrivateName `;`</emu-grammar>
<ul>
<li>
It is a Syntax Error if StringValue of |PrivateName| is `"#constructor"`.
</li>
</ul>

Expand Down

0 comments on commit e7d009b

Please sign in to comment.