Summary
RegExp.prototype accessor getters should throw TypeError for primitive this values (null, undefined, number, etc.).
Why
9 test262 this-val-invalid-obj tests fail across all flag getters.
Current behavior
Getters pass primitives through to IsRegExpValue which returns false, throwing a generic error.
Expected behavior
Calling the getter with a primitive this throws TypeError immediately per ES2026 §22.2.6.*.
Scope notes
- Source: Goccia.Builtins.GlobalRegExp.pas RequireRegExpThis
- Add explicit is-object check before the IsRegExpValue call
Summary
RegExp.prototype accessor getters should throw TypeError for primitive this values (null, undefined, number, etc.).
Why
9 test262 this-val-invalid-obj tests fail across all flag getters.
Current behavior
Getters pass primitives through to IsRegExpValue which returns false, throwing a generic error.
Expected behavior
Calling the getter with a primitive this throws TypeError immediately per ES2026 §22.2.6.*.
Scope notes