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 _expr_ be the |ParenthesizedExpression| that is covered by |CoverParenthesizedExpressionAndArrowParameterList|.
10016
10016
1. Return the AssignmentTargetType of _expr_.
10017
10017
</emu-alg>
10018
+
<emu-grammar>
10019
+
CallExpression :
10020
+
CoverCallExpressionAndAsyncArrowHead
10021
+
CallExpression Arguments
10022
+
</emu-grammar>
10023
+
<emu-alg>
10024
+
1. [normative-optional] If the host is a web browser or otherwise supports <emu-xref href="#sec-late-errors-for-function-call-assignment-targets" title></emu-xref>, then
10025
+
1. If IsStrict(this |CallExpression|) is *false*, return ~web-compat~.
@@ -19990,7 +19998,7 @@ <h1>Static Semantics: Early Errors</h1>
19990
19998
</emu-grammar>
19991
19999
<ul>
19992
20000
<li>
19993
-
It is an early Syntax Error if the AssignmentTargetType of |LeftHandSideExpression| is not ~simple~.
20001
+
It is an early Syntax Error if the AssignmentTargetType of |LeftHandSideExpression| is ~invalid~.
19994
20002
</li>
19995
20003
</ul>
19996
20004
@@ -20001,7 +20009,7 @@ <h1>Static Semantics: Early Errors</h1>
20001
20009
</emu-grammar>
20002
20010
<ul>
20003
20011
<li>
20004
-
It is an early Syntax Error if the AssignmentTargetType of |UnaryExpression| is not ~simple~.
20012
+
It is an early Syntax Error if the AssignmentTargetType of |UnaryExpression| is ~invalid~.
20005
20013
</li>
20006
20014
</ul>
20007
20015
</emu-clause>
@@ -20776,12 +20784,20 @@ <h1>Static Semantics: Early Errors</h1>
20776
20784
If |LeftHandSideExpression| is either an |ObjectLiteral| or an |ArrayLiteral|, |LeftHandSideExpression| must cover an |AssignmentPattern|.
20777
20785
</li>
20778
20786
<li>
20779
-
If |LeftHandSideExpression| is neither an |ObjectLiteral| nor an |ArrayLiteral|, it is a Syntax Error if the AssignmentTargetType of |LeftHandSideExpression| is not ~simple~.
20787
+
If |LeftHandSideExpression| is neither an |ObjectLiteral| nor an |ArrayLiteral|, it is a Syntax Error if the AssignmentTargetType of |LeftHandSideExpression| is ~invalid~.
@@ -22254,7 +22270,7 @@ <h1>Static Semantics: Early Errors</h1>
22254
22270
If |LeftHandSideExpression| is either an |ObjectLiteral| or an |ArrayLiteral|, |LeftHandSideExpression| must cover an |AssignmentPattern|.
22255
22271
</li>
22256
22272
<li>
22257
-
If |LeftHandSideExpression| is neither an |ObjectLiteral| nor an |ArrayLiteral|, it is a Syntax Error if the AssignmentTargetType of |LeftHandSideExpression| is not ~simple~.
22273
+
If |LeftHandSideExpression| is neither an |ObjectLiteral| nor an |ArrayLiteral|, it is a Syntax Error if the AssignmentTargetType of |LeftHandSideExpression| is ~invalid~.
22258
22274
</li>
22259
22275
</ul>
22260
22276
<emu-grammar>
@@ -52991,6 +53007,15 @@ <h1>Non-default behaviour in HostMakeJobCallback</h1>
52991
53007
<h1>Non-default behaviour in HostEnsureCanAddPrivateElement</h1>
52992
53008
<p>The HostEnsureCanAddPrivateElement abstract operation allows hosts which are web browsers to specify non-default behaviour.</p>
<h1>Late Errors for Function Call Assignment Targets</h1>
53013
+
<p>When a function call (<emu-xref href="#sec-function-calls"></emu-xref>) is used as an assignment target in non-strict code, instead of producing an early error, a *ReferenceError* exception may be thrown upon actually attempting the assignment.</p>
53014
+
<emu-note>
53015
+
<p>When the assignment target is the |LeftHandSideExpression| of an |AssignmentExpression|, the assignment operator must be `=` or an |AssignmentOperator|; in particular, the allowance here does not apply to the logical assignment operators (`??=`, `&&=`, `||=`) introduced in ECMAScript 2021.</p>
53016
+
</emu-note>
53017
+
<p>This feature augments the static semantics of AssignmentTargetType in <emu-xref href="#sec-static-semantics-assignmenttargettype"></emu-xref>.</p>
0 commit comments