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
Implicit derived constructor over-allocates the rest array when forwarding to a base that captures ...args (trailing holes); the covering test is red on main #10635
Found while fixing #10625 (PR #10634). This fails on current main — it is not caused by that PR, which was
confirmed by reproducing it with the fix stashed against unmodified main.
A derived class with no own constructor gets an implicit one that forwards to super(...args). When the base
captures a rest parameter, the forwarded array is over-allocated and the trailing slots are left as holes.
It is already covered by a test that nobody sees fail
crates/perry/tests/issue_806_default_derived_ctor_forwarding.rs::walk_into_rest_param_capturing_ctor fails on main today. Per CLAUDE.md, integration suites under crates/*/tests/*.rs run per-PR only when the diff names
them (e2e-scoped); the sweep/full tiers' cargo test --workspace is the backstop, so a regression there lands
on main and is only attributed by sweep window. That is exactly what appears to have happened here — worth
checking whether this is a regression with an identifiable sweep window, or has been red since the test landed.
Likely related
#10623 — an implicit derived constructor does not forward its arguments to a native base's super() at all
(class NoCtor extends AsyncResource {} throws). This issue is the user-base counterpart: arguments are
forwarded, but the rest array is mis-sized. Both live in implicit-derived-constructor argument forwarding and may
share a root cause; whoever fixes one should check the other.
Fixed on main (verified independently on v0.5.1617). This issue's reproducer now gives:
P [ 'a', 'b', 'c' ]
len 3 keys 3
identical to node, where it produced P [ 'a', 'b', 'c', <5 empty items> ]. Checked with Object.keys().length as well as .length, so a trailing hole could not hide behind the array's length.
One loose end from the issue's own text: it records that issue_806_default_derived_ctor_forwarding.rs::walk_into_rest_param_capturing_ctor was red on main. A single cargo test -p perry --test issue_806_default_derived_ctor_forwarding would confirm that went green too — I did not run it, and it is cheap.
Activity
proggeramlug commentedon Sep 20, 2026
Fixed on
main(verified independently on v0.5.1617). This issue's reproducer now gives:identical to node, where it produced
P [ 'a', 'b', 'c', <5 empty items> ]. Checked withObject.keys().lengthas well as.length, so a trailing hole could not hide behind the array's length.One loose end from the issue's own text: it records that
issue_806_default_derived_ctor_forwarding.rs::walk_into_rest_param_capturing_ctorwas red on main. A singlecargo test -p perry --test issue_806_default_derived_ctor_forwardingwould confirm that went green too — I did not run it, and it is cheap.