You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
The rule which prevents initializers from referring to arguments uses Contains, which does not descend into arrow functions except for new.target, super, and this.
It should be an early error, I think. Including recursively - we should disallow
classA{a=b=>c=>{returnarguments;};}
Not entirely sure how to spec it though.
The text was updated successfully, but these errors were encountered:
As a strawman, we could add a new algorithm ContainsArguments which descends into everything except FunctionDeclaration/Expression and ClassBody (taking advantage of chain productions to minimize the amount of spec text necessary). I'll try to spec that to see how it looks.
Also, strictly speaking, I don't think Contains can be used for something as specific as 'an IdentifierReference whose StringValue is "arguments".' It takes a terminal or nonterminal as an argument; I don't know if it can be used to look for nonterminals with specific properties.
The rule which prevents initializers from referring to
arguments
usesContains
, which does not descend into arrow functions except fornew.target
,super
, andthis
.It should be an early error, I think. Including recursively - we should disallow
Not entirely sure how to spec it though.
The text was updated successfully, but these errors were encountered: