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
1. Let _scope_ be the LexicalEnvironment of the running execution context.
7
+
1. Let _sourceText_ be the source text matched by |ArrowFunction|.
8
+
1. Let _parameters_ be CoveredFormalsList of |ArrowParameters|.
9
+
1.[id="step-arrowfunction-evaluation-functioncreate"] Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, _parameters_, |ConciseBody|, ~lexical-this~, _scope_).
10
+
1. Perform SetFunctionName(_closure_, _name_).
11
+
1. Return _closure_.
12
+
</emu-alg>
13
+
<emu-note>
14
+
<p>An |ArrowFunction| does not define local bindings for `arguments`, `super`<ins>, `class`</ins>, `this`, or `new.target`. Any reference to `arguments`, `super`<ins>, `class`</ins>, `this`, or `new.target` within an |ArrowFunction| must resolve to a binding in a lexically enclosing environment. Typically this will be the Function Environment of an immediately enclosing function. Even though an |ArrowFunction| may contain references to `super`, the function object created in step <emu-xrefhref="#step-arrowfunction-evaluation-functioncreate"></emu-xref> is not made into a method by performing MakeMethod. An |ArrowFunction| that references `super`<ins> or `class`</ins> is always contained within a non-|ArrowFunction| and the necessary state to implement `super`<ins> or `class`</ins> is accessible via the _scope_ that is captured by the function object of the |ArrowFunction|.</p>
1. If _symbol_ is not one of |NewTarget|, |SuperProperty|, |SuperCall|<ins>, |ClassProperty|</ins>, `super`<ins>, `class`</ins> or `this`, return *false*.
8
+
1. If |ArrowParameters| Contains _symbol_ is *true*, return *true*.
9
+
1. Return |ConciseBody| Contains _symbol_.
10
+
</emu-alg>
11
+
<emu-note>
12
+
<p>Normally, Contains does not look inside most function forms. However, Contains is used to detect `new.target`, `this`, <del>and `super`</del><ins>, `super` and `class`-property</ins> usage within an |ArrowFunction|.</p>
1. If _symbol_ is not one of |NewTarget|, |SuperProperty|, |SuperCall|<ins>, |ClassProperty|</ins>, `super`<ins>, `class`</ins>, or `this`, return *false*.
1. If _symbol_ is not one of |NewTarget|, |SuperProperty|, |SuperCall|<ins>, |ClassProperty|</ins>, `super`<ins>, `class`</ins>, or `this`, return *false*.
16
+
1. Let _head_ be CoveredAsyncArrowHead of |CoverCallExpressionAndAsyncArrowHead|.
17
+
1. If _head_ Contains _symbol_ is *true*, return *true*.
18
+
1. Return |AsyncConciseBody| Contains _symbol_.
19
+
</emu-alg>
20
+
<emu-note>Normally, Contains does not look inside most function forms. However, Contains is used to detect `new.target`, `this`, <del>and `super`</del><ins>, `super`, and `class`-property</ins> usage within an AsyncArrowFunction.</emu-note>
<li>It is a Syntax Error if ContainsUseStrict of |AsyncFunctionBody| is *true* and IsSimpleParameterList of |FormalParameters| is *false*.</li>
14
+
<li>It is a Syntax Error if |FormalParameters| Contains |AwaitExpression| is *true*.</li>
15
+
<li>If the source code matching |FormalParameters| is strict mode code, the Early Error rules for <emu-grammar>UniqueFormalParameters:FormalParameters</emu-grammar> are applied.</li>
16
+
<li>If |BindingIdentifier| is present and the source code matching |BindingIdentifier| is strict mode code, it is a Syntax Error if the StringValue of |BindingIdentifier| is *"eval"* or *"arguments"*.</li>
17
+
<li>It is a Syntax Error if any element of the BoundNames of |FormalParameters| also occurs in the LexicallyDeclaredNames of |AsyncFunctionBody|.</li>
18
+
<li>It is a Syntax Error if |FormalParameters| Contains |SuperProperty| is *true*.</li>
19
+
<li>It is a Syntax Error if |AsyncFunctionBody| Contains |SuperProperty| is *true*.</li>
20
+
<li>It is a Syntax Error if |FormalParameters| Contains |SuperCall| is *true*.</li>
21
+
<li>It is a Syntax Error if |AsyncFunctionBody| Contains |SuperCall| is *true*.</li>
22
+
<li><ins>It is a Syntax Error if |FormalParameters| Contains |ClassProperty| is *true*.</ins></li>
23
+
<li><ins>It is a Syntax Error if |AsyncFunctionBody| Contains |ClassProperty| is *true*.</ins></li>
<li>If the source code matching |FormalParameters| is strict mode code, the Early Error rules for <emu-grammar>UniqueFormalParameters:FormalParameters</emu-grammar> are applied.</li>
12
+
<li>If |BindingIdentifier| is present and the source code matching |BindingIdentifier| is strict mode code, it is a Syntax Error if the StringValue of |BindingIdentifier| is *"eval"* or *"arguments"*.</li>
13
+
<li>It is a Syntax Error if ContainsUseStrict of |AsyncGeneratorBody| is *true* and IsSimpleParameterList of |FormalParameters| is *false*.</li>
14
+
<li>It is a Syntax Error if any element of the BoundNames of |FormalParameters| also occurs in the LexicallyDeclaredNames of |AsyncGeneratorBody|.</li>
15
+
<li>It is a Syntax Error if |FormalParameters| Contains |YieldExpression| is *true*.</li>
16
+
<li>It is a Syntax Error if |FormalParameters| Contains |AwaitExpression| is *true*.</li>
17
+
<li>It is a Syntax Error if |FormalParameters| Contains |SuperProperty| is *true*.</li>
18
+
<li>It is a Syntax Error if |AsyncGeneratorBody| Contains |SuperProperty| is *true*.</li>
19
+
<li>It is a Syntax Error if |FormalParameters| Contains |SuperCall| is *true*.</li>
20
+
<li>It is a Syntax Error if |AsyncGeneratorBody| Contains |SuperCall| is *true*.</li>
21
+
<li><ins>It is a Syntax Error if |FormalParameters| Contains |ClassProperty| is *true*.</ins></li>
22
+
<li><ins>It is a Syntax Error if |AsyncGeneratorBody| Contains |ClassProperty| is *true*.</ins></li>
0 commit comments