Summary
Boxed primitive objects participate in addition through OrdinaryToPrimitive, yielding primitive boolean/number/string values before numeric or string addition.
Affected Test262 rows
Perry actual behavior from report
Node / ECMAScript expected behavior
Boxed primitive objects participate in addition through OrdinaryToPrimitive, yielding primitive boolean/number/string values before numeric or string addition.
Likely subsystem
runtime object model / ToPrimitive for boxed primitives
Acceptance criteria
new Boolean(true) + 1, new Number(1) + null, and new String("1") + undefined match Node.
- String concatenation vs numeric addition decisions follow the post-ToPrimitive operand types.
- Boxed primitive object identity behavior outside coercion does not regress.
Validation
Run the Test262 differential against the affected area and confirm these rows leave the gap report:
scripts/test262_subset.py --root vendor/test262 --dir language/expressions/addition --sample-cap 99999 --report /tmp/COERCION_BOXED_PRIMITIVES.json
This is Perry language/runtime semantics triage, not a Node core API compatibility issue.
Summary
Boxed primitive objects participate in addition through OrdinaryToPrimitive, yielding primitive boolean/number/string values before numeric or string addition.
Affected Test262 rows
styleattribute in HTML. #185 language/expressions/addition/S11.6.1_A3.2_T2.2.js (runtime-fail: Uncaught exception: Using the fetch API #3: new Boolean(true) + "1" === "true1". Actual: [object Object]1)Perry actual behavior from report
Node / ECMAScript expected behavior
Boxed primitive objects participate in addition through OrdinaryToPrimitive, yielding primitive boolean/number/string values before numeric or string addition.
Likely subsystem
runtime object model / ToPrimitive for boxed primitives
Acceptance criteria
new Boolean(true) + 1,new Number(1) + null, andnew String("1") + undefinedmatch Node.Validation
Run the Test262 differential against the affected area and confirm these rows leave the gap report:
This is Perry language/runtime semantics triage, not a Node core API compatibility issue.