Skip to content

Fix bug in handling of blocks that occur in expresssions#672

Merged
keyboardDrummer merged 16 commits intomainfrom
fixImpureExpressionBlockHandling
Mar 30, 2026
Merged

Fix bug in handling of blocks that occur in expresssions#672
keyboardDrummer merged 16 commits intomainfrom
fixImpureExpressionBlockHandling

Conversation

@keyboardDrummer
Copy link
Copy Markdown
Contributor

@keyboardDrummer keyboardDrummer commented Mar 26, 2026

Changes

  • Fix bug in handling of blocks that occur in expressions. The heart of the problem was that transformStmt, which does not update the substitution map, was being called from inside transformExpr when it was handling a block, leading to missing substitutions. A second but smaller bug was a statement ordering bug that occurred when handling calls.

Testing

  • Added test-case

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@keyboardDrummer keyboardDrummer requested review from a team and olivier-aws March 26, 2026 10:49
joscoh
joscoh previously approved these changes Mar 26, 2026
Copy link
Copy Markdown
Contributor

@joscoh joscoh left a comment

Choose a reason for hiding this comment

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

Can you update the PR with a short description of what the bug is?

@keyboardDrummer keyboardDrummer requested a review from joscoh March 26, 2026 16:55
@keyboardDrummer keyboardDrummer requested a review from joscoh March 27, 2026 08:54
@joscoh joscoh added the Laurel label Mar 30, 2026
Copy link
Copy Markdown
Contributor

@MikaelMayer MikaelMayer left a comment

Choose a reason for hiding this comment

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

The core fix — switching from transformStmt to transformExpr for block handling and fixing the call ordering — looks correct and well-motivated. The new test cases are good. A few items to address below.

@keyboardDrummer keyboardDrummer added this pull request to the merge queue Mar 30, 2026
Merged via the queue into main with commit 52268e8 Mar 30, 2026
15 checks passed
@keyboardDrummer keyboardDrummer deleted the fixImpureExpressionBlockHandling branch March 30, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants