Root cause
Static semantics for AssignmentTargetType (§13.1.2) require a ReferenceError at runtime for certain left-hand-side expressions that are syntactically valid but semantically invalid assignment targets (e.g., evaluated-not-simple patterns). The engine currently emits SyntaxError at parse time instead, or emits no error at all.
Affected patterns include: certain parenthesized expressions, destructuring covers, and for-in LHS patterns.
Failure breakdown — language/expressions suite (2026-06-21)
| Failure type |
Count |
| Expected ReferenceError, got SyntaxError |
3 |
| Expected exception, got none |
3 |
| Invalid assignment target (parse error) |
1 |
| Total |
7 unique files |
Fix direction
Distinguish between syntactically invalid LHS (emit SyntaxError at parse time) and semantically invalid LHS that is only invalid at assignment time (emit ReferenceError at runtime). The spec splits these between static semantics (§13.1.2 AssignmentTargetType = invalid → parse error) and runtime semantics (evaluate → target → throw).
Root cause
Static semantics for
AssignmentTargetType(§13.1.2) require aReferenceErrorat runtime for certain left-hand-side expressions that are syntactically valid but semantically invalid assignment targets (e.g., evaluated-not-simple patterns). The engine currently emitsSyntaxErrorat parse time instead, or emits no error at all.Affected patterns include: certain parenthesized expressions, destructuring covers, and
for-inLHS patterns.Failure breakdown — language/expressions suite (2026-06-21)
Fix direction
Distinguish between syntactically invalid LHS (emit
SyntaxErrorat parse time) and semantically invalid LHS that is only invalid at assignment time (emitReferenceErrorat runtime). The spec splits these between static semantics (§13.1.2 AssignmentTargetType = invalid → parse error) and runtime semantics (evaluate → target → throw).