Parent: #904. Related: #899, #920, #921.
Reproduced behavior
On main 41104a44, compile-only probes match 9/16 expected outcomes in both tree-walker and required-VM modes; independent Node/V8 matches 16/16. Seven invalid programs are accepted, while all eight valid controls and one direct parameter rejection already behave correctly. These are focused probe results, not a test262 denominator.
Minimal examples (compilation must throw SyntaxError even without invoking the arrows):
Function('class C { static { const f = () => arguments; } }');
Function('class C extends Object { static { const f = () => super(); } }');Also reproduced with async arrows, nested arrows, destructuring defaults in an arrow body, and computed object keys in an arrow body.
Root cause
The static-block validation enables scan_forbid_await while asking the shared scanSuperAndArgs visitor to enforce three different early-error queries. Its arrow-function branch scans parameters and then returns whenever either await/yield flag is set. Skipping an arrow body is appropriate for the enclosing await/yield query, but it also drops the lexical arguments and SuperCall queries, which must continue through arrows. Ordinary functions must still stop those lexical queries.
ECMA-262 2026 sections 15.7.1 and 15.7.9 specify the distinct class-static-block and ContainsArguments rules: https://tc39.es/ecma262/2026/multipage/ecmascript-language-functions-and-classes.html#sec-class-definitions-static-semantics-early-errors
Required fix and gates
- Model the separate query boundaries explicitly rather than letting one query's stop condition disable the others.
- Preserve legal await inside nested async arrows and ordinary-function arguments bindings.
- Preserve derived-constructor super bindings, including an async-arrow parameter whose default is an arrow containing a legal super call; a blanket descent could incorrectly reject this control.
- Cover script/module parser entry points, Function construction, and eval rejection before prior side effects in tree-walker/required VM.
- Run focused parser/context units and exact-before/after static-block, field, arrow, and async-parameter conformance checks serially with bounded resources.
No production fix or new corpus result is claimed yet.