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.
import { EventEmitterAsyncResource } from "node:events";
class NoCtorEEAR extends EventEmitterAsyncResource {}
const e = new NoCtorEEAR();
console.log(typeof e.on, typeof e.triggerAsyncId, e instanceof EventEmitterAsyncResource);
Node: function number true
Perry: function number false
Note the instance is otherwise correct — on and triggerAsyncId are both present and of the right type. Only
the instanceof check disagrees.
Relationship to other open work — needs checking, not assumed
AsyncLocalStorage was initially reported as having the same gap; that was wrong and has been retracted — it
returns true on both Node and Perry.
Found while fixing #10623 (PR #10636). Reproduces on clean
mainand is unrelated to that PR — this is a plainESM
importwith norequire()/CJS wrapper involved, and #10636 touches only heritage resolution duringlowering, not the
instanceofruntime check.Node:
function number truePerry:
function number falseNote the instance is otherwise correct —
onandtriggerAsyncIdare both present and of the right type. Onlythe
instanceofcheck disagrees.Relationship to other open work — needs checking, not assumed
instanceofagainst aClassExprFreshparent resolving by shared class id) — the repro here is aclass declaration, not a class expression, so on the face of it this is a different shape. Not verified.
instanceofagainst anative base is a prototype-chain-identity question. It added
EventEmitterAsyncResourcetobuiltin_parent_reserved_class_id(id0xFFFF0077), so this may already be fixed on that branch — checkthere first before doing any work.
AsyncLocalStoragewas initially reported as having the same gap; that was wrong and has been retracted — itreturns
trueon both Node and Perry.