According to the spec[1], syntax error should be thrown for logical assignment expressions that LHS is a function call. ```js function foo() {} foo() &&= 3; ``` According to https://commits.webkit.org/223412@main, it was intentional that JSC not throw a syntax error for this. However, four years have passed since then, and the related specifications have not been updated. Also V8 and SpiderMonkey throw his Syntax Error. ``` $ cat ./logical-assignment-syntax-error.js function foo() {} foo() ??= 3; $ eshost ./logical-assignment-syntax-error.js #### JavaScriptCore ReferenceError: Left side of assignment is not a reference. #### SpiderMonkey SyntaxError: invalid assignment left-hand side: #### V8 SyntaxError: Invalid left-hand side in assignment ``` So I think JSC should also follow the specifications. [1]: https://tc39.es/ecma262/#sec-assignment-operators-static-semantics-early-errors
Pull request: https://github.com/WebKit/WebKit/pull/27145
Committed 277536@main (b8cb1ca3b5f0): <https://commits.webkit.org/277536@main> Reviewed commits have been landed. Closing PR #27145 and removing active labels.
<rdar://problem/126540636>