Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(engine) Fix loops with continue and no return/break #1296

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

maximebuyse
Copy link
Contributor

Fixes #1288.

In loops that have only continue and no return/break we don't need to wrap the continue value in a ControlFlow type. This was already expected and hax produced the right type for the loop but still wrapped the value. This PR fixes this to so that the continue statement is replaced by just the value of the accumulator.

@maximebuyse maximebuyse self-assigned this Feb 6, 2025
@maximebuyse maximebuyse requested a review from a team as a code owner February 6, 2025 10:37
@maximebuyse maximebuyse requested a review from W95Psp February 6, 2025 10:43
Copy link
Collaborator

@W95Psp W95Psp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@W95Psp W95Psp added this pull request to the merge queue Feb 10, 2025
Merged via the queue into main with commit 45e0927 Feb 10, 2025
15 checks passed
@W95Psp W95Psp deleted the fix-continue-only-loop branch February 10, 2025 17:08
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.

Wrong type with control flow expected in a fold with continue
2 participants