Skip to content

hotfix: lower generator concat echoes after yield from#325

Merged
nahime0 merged 2 commits into
mainfrom
codex/fix-yield-from-return-echo
Jun 1, 2026
Merged

hotfix: lower generator concat echoes after yield from#325
nahime0 merged 2 commits into
mainfrom
codex/fix-yield-from-return-echo

Conversation

@nahime0
Copy link
Copy Markdown
Member

@nahime0 nahime0 commented Jun 1, 2026

Summary

  • lower generator echo concat expressions as source-order echo operations
  • keep variables used in generator concat echoes on the Mixed path
  • add a regression for yield-from return values used in concat echoes

Validation

  • cargo test test_generator_yield_from_return_value_survives_concat_echo_after_delegation -- --nocapture
  • cargo test codegen::generators::yield_from
  • cargo test codegen::generators
  • manual PHP/elephc comparison for the issue reproduction: both print 1:9
  • git diff --check

Closes #192

@nahime0 nahime0 merged commit f20bd5b into main Jun 1, 2026
2 checks passed
@nahime0 nahime0 deleted the codex/fix-yield-from-return-echo branch June 1, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] yield from return value is lost when captured and yielded by the outer generator

1 participant