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
User method named push on an instance from new <any class value> loses its effects and returns the wrong value #11128
Calling a user-defined method named push on an instance built with new from an any-typed class value gives the wrong result. The method's effects are lost and its return value is wrong. The same call on new R() typed as any works. So does any other method name.
Perry origin/main784ed8e (perry-dev build, PERRY_NO_AUTO_OPTIMIZE=1): undefined false
Control: const r: any = new R(); r.push(1) prints 1 true on Perry. With the method renamed (for example to add), the dynamic-construct case prints correctly too.
A likely suspect is the call being lowered as an array push, which rewrites the receiver local. That would fit r.n becoming undefined, but it has not been confirmed.
Found while fixing #11120. It is independent of that fix. Not yet checked: whether redis's linked-list.js, which also has push methods, reaches this path.
Confirmed that redis's linked-list.js hits this. I compiled the file verbatim as a compilePackages package (on #11129 + #11122) and drove it from a .ts entry with const { SinglyLinkedList, EmptyAwareSinglyLinkedList } = require(...):
call
Node 26.5.1
Perry
s.push(1); s.length
1
0
s.shift() after that
1
undefined
e.push("a"); e.push("b"); e.length
2
1
DoublyLinkedList (push/remove/iterate) matched Node in the same probe. @redis/client's command queue uses these lists, so once #11131 is fixed this is likely the next redis failure.
Activity
proggeramlug commentedon Sep 23, 2026
Confirmed that redis's
linked-list.jshits this. I compiled the file verbatim as acompilePackagespackage (on #11129 + #11122) and drove it from a.tsentry withconst { SinglyLinkedList, EmptyAwareSinglyLinkedList } = require(...):s.push(1); s.length10s.shift()after that1undefinede.push("a"); e.push("b"); e.length21DoublyLinkedList(push/remove/iterate) matched Node in the same probe.@redis/client's command queue uses these lists, so once #11131 is fixed this is likely the next redis failure.fix(hir): InstanceType<typeof C> receivers are not proven arrays; ext…
test(hir): #11128 lowering test + module-level InstanceType gap case
fix(hir): type new <value binding>() as Any so builtin-named user met…
fix(hir): InstanceType<typeof C> receivers are not proven arrays; ext…
test(hir): #11128 lowering test + module-level InstanceType gap case
fix(hir): an in-scope local class value wins over a same-named outer …
fix(hir): type new <value binding>() as Any so builtin-named user met…
fix(hir): InstanceType<typeof C> receivers are not proven arrays; ext…
test(hir): #11128 lowering test + module-level InstanceType gap case
fix(hir): type new <value binding>() as Any so builtin-named user met…
fix(hir): InstanceType<typeof C> receivers are not proven arrays; ext…
test(hir): #11128 lowering test + module-level InstanceType gap case