Commit 3ea5b85
fix: block-scope internal temps and include target in collectStmtNames
Address bugbot findings:
1. Wrap call/revert/sizeCheck in a YulStmt.block so __ecwr_success is
block-scoped. This prevents duplicate let declarations when multiple
externalCallWithReturn statements appear in the same function body.
The resultVar binding remains flat-scoped (outside the block) so
subsequent statements can reference it.
2. Include the target expression in collectStmtNames for
externalCallWithReturn, matching all other handler functions.
Adds test: multiple externalCallWithReturn in same function compiles
without collision.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent c5bfef0 commit 3ea5b85
2 files changed
Lines changed: 36 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
608 | | - | |
| 607 | + | |
| 608 | + | |
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| |||
3607 | 3607 | | |
3608 | 3608 | | |
3609 | 3609 | | |
3610 | | - | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
3611 | 3616 | | |
3612 | | - | |
3613 | | - | |
| 3617 | + | |
3614 | 3618 | | |
3615 | 3619 | | |
3616 | 3620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4619 | 4619 | | |
4620 | 4620 | | |
4621 | 4621 | | |
| 4622 | + | |
| 4623 | + | |
| 4624 | + | |
| 4625 | + | |
| 4626 | + | |
| 4627 | + | |
| 4628 | + | |
| 4629 | + | |
| 4630 | + | |
| 4631 | + | |
| 4632 | + | |
| 4633 | + | |
| 4634 | + | |
| 4635 | + | |
| 4636 | + | |
| 4637 | + | |
| 4638 | + | |
| 4639 | + | |
| 4640 | + | |
| 4641 | + | |
| 4642 | + | |
| 4643 | + | |
| 4644 | + | |
| 4645 | + | |
| 4646 | + | |
| 4647 | + | |
| 4648 | + | |
4622 | 4649 | | |
0 commit comments