Files
scriptc/tests/corpus/builtin-function-record-values
Malte UblandClaude Opus 5.5 8514c45b53 Make builtin module functions real function values in JavaScript
uuid 11 threw `TypeError: native.randomUUID is not a function` where
Node works. Root cause: a builtin module function used as a JavaScript
value without a function-value adapter lowered to a string identity
token ("[builtin crypto.randomUUID]"); uuid's native.js stores it in an
exported record (`export default { randomUUID }`), so the call hit a
string and typeof answered "string".

crypto.randomUUID and randomUUIDv7 get value adapters (randomUUID's
through its options-validating entry point, the new valueFn surface
field), boxed adapters carry the builtin's name, and every other
builtin module function value is one function per builtin that throws
the named SC1090 fence when called, keeping identity, typeof and
inspection Node's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 15:41:10 -07:00
..