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
@@iterator leaks as a string own key, and a well-known-symbol prototype replacement is ignored #9788
constR=class{*[Symbol.iterator](){yield1;yield2;}};console.log(Object.getOwnPropertyNames(R.prototype).join(","));// node : constructor// perry: constructor,@@iterator <-- a SYMBOL key leaking as a STRING key
#9239 was closed on 2026-09-04 by 4153caea15 ("preserve fresh prototype replacements"). That commit fixes replacing a named method (C.prototype.m = ...) and its fixture test_gap_9239_fresh_instance_prototype_replacement.ts is exactly that shape. Neither defect above involves a named method, and both reproduce on main@12efed1222.
Entry point
crates/perry-hir/src/lower_decl/helpers.rs::is_special_lowered_well_known and the own-key registration beside it (the "@@iterator" spelling).
Untested hypothesis worth checking in the same pass: that predicate's "iterator" arm requires method.function.is_generator, so a non-generator[Symbol.iterator]() { return ...; } may not be exempted at all and would take the generic computed-member path.
Fixed by #9811, landed on main via merge train #9817. The train merged as its own branch, so the close-keyword never fired — closing manually, verified on main by patch-id.
Activity
proggeramlug commentedon Sep 5, 2026
Fixed by #9811, landed on
mainvia merge train #9817. The train merged as its own branch, so the close-keyword never fired — closing manually, verified onmainby patch-id.