You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
util.inspect/console.log: classes print as bare integers, holes as NaN, resolved promises as pending #9415
console.log(classKlass{})// node "[class Klass]" perry "49" (a bare integer)console.log(newArray(3))// node "[ <3 empty items> ]" perry "[ NaN, NaN, NaN ]"console.log(Promise.resolve(1))// node "Promise { 1 }" perry "Promise { <pending> }"
Three distinct inspect defects. The first is the worst: a class value prints as an integer (its class id leaking through), which is unrecognisable rather than merely differently formatted. The second turns holes into NaN, which is a wrong value, not a formatting choice. The third reports a settled promise as pending.
Debug output is how people diagnose everything else, so these make every other investigation harder.
Found by a differential stress-test of claude-code under perry.
Fixed by PR #9461: classes print [class Name] (the INT32/class-ref tag ambiguity, resolved via the shared value_repr classifier that #9472 also standardized #9465's fix onto), holes render <N empty items>/undefined instead of NaN in both array walks and Map/Set, and promise state is read (Promise { 1 }, <rejected>). test_gap_9415_inspect_class_hole_promise.ts. Verified on main 0a1c137d90 with a fresh build: fixture byte-identical to node --experimental-strip-types (stdout, stderr, and exit code).
The rest of the fall-through-to-double family is filed as #9462 (hole-leak source + typeof/String/console.table) and #9463 (%s/%o policy).
Activity
fix(runtime): inspect decodes classes, holes and promise state (Perry…
fix(runtime): inspect decodes classes, holes and promise state (#9415)…
proggeramlug commentedon Sep 2, 2026
Fixed by PR #9461: classes print
[class Name](the INT32/class-ref tag ambiguity, resolved via the sharedvalue_reprclassifier that #9472 also standardized #9465's fix onto), holes render<N empty items>/undefinedinstead ofNaNin both array walks and Map/Set, and promise state is read (Promise { 1 },<rejected>).test_gap_9415_inspect_class_hole_promise.ts. Verified on main0a1c137d90with a fresh build: fixture byte-identical tonode --experimental-strip-types(stdout, stderr, and exit code).The rest of the fall-through-to-double family is filed as #9462 (hole-leak source + typeof/String/console.table) and #9463 (%s/%o policy).