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
A by-ref argument fed from a spread lands in a throwaway slot #61
area:refsReference cells / by-ref semanticsbugSomething isn't workingneeds-designNeeds a design/epic, not a local fixwrong-answerCompiles and runs, output differs from php
Known-bug repro: tests/aot/repro/wrong/spread_into_byref.php — bash tests/aot/xfail.sh -k spread_into_byref reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.
Scope: emitter change.f(...$args) into a by-ref param: the spread is expanded in emitSpreadFill, which copies elements by value. Binding by-ref needs element addresses plus write-back with copy-on-write separation of the source array. Not fixable in lowering. Repro: tests/aot/repro/wrong/spread_into_byref.php.
Spread into a by-ref parameter is also the one shape left open from #352. The fix for #352 (branch fix/refs-r4-r3, a62b0dd5) covers inherited constructors and first-class callables. $g->keep(...$arr), where keep stores its by-ref argument, is not covered and stays tracked here. The reduced repro is tests/aot/repro/wrong/spread_into_byref.
area:refsReference cells / by-ref semanticsbugSomething isn't workingneeds-designNeeds a design/epic, not a local fixwrong-answerCompiles and runs, output differs from php
Activity
blacktrs commentedon Oct 13, 2026
Scope: emitter change.
f(...$args)into a by-ref param: the spread is expanded inemitSpreadFill, which copies elements by value. Binding by-ref needs element addresses plus write-back with copy-on-write separation of the source array. Not fixable in lowering. Repro:tests/aot/repro/wrong/spread_into_byref.php.blacktrs commentedon Oct 24, 2026
Spread into a by-ref parameter is also the one shape left open from #352. The fix for #352 (branch
fix/refs-r4-r3,a62b0dd5) covers inherited constructors and first-class callables.$g->keep(...$arr), wherekeepstores its by-ref argument, is not covered and stays tracked here. The reduced repro istests/aot/repro/wrong/spread_into_byref.Fix the bug backlog: coercion, references, crashes, uninitialised typ…