Parent: #904. Related: #899, #920, #921, #922.
Reproduced on 1adf483
Compile-only Function-constructor probes match 6/16 specified outcomes in both tree-walker and required-VM modes; independent Node/V8 matches 16/16. All ten invalid programs are accepted. All six valid controls already pass. These are focused probes, not test262 totals.
Examples that must throw SyntaxError during compilation, even if the function or method is never called:
Function('class C extends super() {}');
Function('class C { [super.key]() {} }');
Function('function f() { return class extends super.Object {}; }');
Function('class C extends Object { m() { return class extends super() {}; } }');
Function('async function f(x = class extends (await Object) {}) {}');
Function('async function f(x = class { [await 0]() {} }) {}');
Function('function* f(x = class extends (yield Object) {}) {}');
Function('function* f(x = class { [yield 0]() {} }) {}');The remaining two failing shapes put a SuperProperty in global class heritage and a SuperCall in a global computed method name.
Root cause and specification boundary
The shared parser early-error visitor wraps its entire class-expression case in scan_descend_class_expr. Ordinary-function, method, global/eval, and parameter suspension queries leave that flag false, skipping not only class bodies but also heritage and computed names.
ECMA-262 2026 8.5.1 Contains and 8.5.2 ComputedPropertyContains require these outer-context expressions to be visited. Method bodies, field initializers, and static blocks are separate boundaries for these Contains queries. 15.7.9 ContainsArguments has a distinct traversal rule and must not be weakened while correcting the class boundary.
Fix and verification requirements
- Visit heritage and computed keys for every active query, without letting the class-body policy disable them.
- Preserve the separate initializer/static-block policy for ContainsArguments; do not impose outer SuperProperty or suspension bans on a nested class's own method/initializer context.
- Preserve legal derived-constructor super use in heritage, method-owned super properties in computed keys, await/yield in permitted function bodies, and nested constructors' own super calls.
- Add script/module parser fixtures and Function/eval checks in both modes, including rejection before earlier side effects.
- Run serial bounded focused units and exact-before/after relevant class, arrow, async, generator and eval corpus checks. Retain raw failure lists and denominators.
No fix or new corpus improvement is claimed yet. The separately verified arrow-boundary fix in #922 is already pushed and remains a distinct change.