Commit 62318b3
cardigan1008
fix: Check whether next_node is else-less if in get_return_block
Fix #124819, where a if-less block causes a wrong output. It is
caused by get_return_block in get_fn_decl. In get_return_block,
when a else-less if expression is the tail expression, the check
for next_node will keep iterating. So it is necessary to make a
early return in the check.1 parent c54301f commit 62318b3
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
| 552 | + | |
552 | 553 | | |
553 | 554 | | |
554 | 555 | | |
| |||
563 | 564 | | |
564 | 565 | | |
565 | 566 | | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | 567 | | |
570 | 568 | | |
571 | 569 | | |
| |||
0 commit comments