Files
swift-mirror/test/SILGen/switch_fallthrough.swift
Doug Gregor 7f7530f4e7 [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.
2020-08-31 16:11:55 -07:00

5.0 KiB