Files
rust_browser/tests/external/js262/expected/class-no-new-error.txt
Zachary D. Rowitsch 3fb0301693
All checks were successful
ci / fast (linux) (push) Successful in 6m21s
Add JavaScript Error constructors to global scope
Implement Error, TypeError, ReferenceError, SyntaxError, RangeError,
EvalError, and URIError as proper constructable globals with correct
prototype chains. Internal runtime errors (from null property access,
undeclared variables, TDZ violations, etc.) are now converted to proper
Error objects when caught in try/catch, enabling instanceof checks and
the Test262 assert.throws() pattern.

Key design decisions:
- native_body field on JsFunction for Rust-implemented constructor bodies
- Engine-private ErrorPrototypes cache on Environment (immune to shadowing)
- #[inline(never)] extraction of native body dispatch to preserve stack frame size
- Fix JsValue::Function identity comparison (PartialEq and strict_eq)

Promotes 72 previously-failing js262 tests to pass (501 pass, 215 known_fail).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 19:13:12 -05:00

3 lines
80 B
Plaintext

object
Class constructor Foo cannot be invoked without 'new' (at line 7, col 5)