Commit 7f7530f
committed
[Statement checking] Fix "old" fallthrough source.
Fallthrough statement sources have always been incorrectly computed
when there are nested switch statements. The recent refactoring to
switch fallthrough source/destination computation over to ASTScope
fixed the computation. Amusingly, the assertion that ensures that the
old and new implementations produce the same result fires on these
cases, but it's the old implementation that's wrong. Fix up the old
implementation so the assertion does not trigger. The new test case
crashes in Swift 5.3 and earlier, asserts prior to this change.
Fixes rdar://problem/67704651.1 parent cabcbc9 commit 7f7530f
File tree
2 files changed
+22
-1
lines changed- lib/Sema
- test/SILGen
2 files changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
| 728 | + | |
728 | 729 | | |
729 | | - | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
730 | 733 | | |
731 | 734 | | |
732 | 735 | | |
733 | 736 | | |
| 737 | + | |
734 | 738 | | |
735 | 739 | | |
736 | 740 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
0 commit comments