Commit graph

1 commit

Author SHA1 Message Date
Sebastian Herrlinger
b97c413f60 fix(codemode): match the reference's callback rules and messages in built-ins
Found while reading the rebase's recordings; none of these were recorded
before, and the pre-rebase reference behaves the same except where noted.

- Callback sites (array methods, sort, then/catch/finally, replace and
  replaceAll, JSON.parse's reviver and JSON.stringify's replacer) admit
  what the reference's isSupportedCallback does: not the Promise statics
  or Symbol (marked NOT_CALLBACK), nor a namespace reference, each refused
  with the site's wording. The hint now says (value) => fn(value), as on
  dev.
- Symbol says it isn't callable, and new Symbol() asks for a call.
- Array.prototype methods on a receiver that isn't an array name themselves
  and what they got.
- JSON.parse fails with its host runtime's message after the reference's
  prefix, from the parser Response.json already used.
- Assigning to a namespace says only data fields may be assigned; a
  namespace is described as a namespace reference, and the un-awaited
  promise hint names load(...), as on dev.

Recorded: std-callback-admission, std-json-parse-errors and
std-array-receivers.
2026-11-18 21:55:08 +01:00