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
class X extends EventEmitterAsyncResource {}: instance is correct but 'x instanceof EventEmitterAsyncResource' is false #10638
Found while fixing #10623 (PR #10636). Reproduces on clean main and is unrelated to that PR — this is a plain
ESM import with no require()/CJS wrapper involved, and #10636 touches only heritage resolution during
lowering, not the instanceof runtime check.
PR fix(runtime): link a native-base subclass prototype to the real builtin prototype #10614 (native-base subclass prototype identity) — conceptually adjacent, since instanceof against a
native base is a prototype-chain-identity question. It added EventEmitterAsyncResource to builtin_parent_reserved_class_id (id 0xFFFF0077), so this may already be fixed on that branch — check
there first before doing any work.
AsyncLocalStorage was initially reported as having the same gap; that was wrong and has been retracted — it
returns true on both Node and Perry.
Fixed on main (verified on v0.5.1617). class X extends EventEmitterAsyncResource {} now gives function number true, matching node — instanceof was false.
This issue predicted PR #10614 might already cover it. It did.
Activity
proggeramlug commentedon Sep 20, 2026
Fixed on
main(verified on v0.5.1617).class X extends EventEmitterAsyncResource {}now givesfunction number true, matching node —instanceofwasfalse.This issue predicted PR #10614 might already cover it. It did.