mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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.
5.0 KiB
5.0 KiB