[SR-8197] REGRESSION: Switch exhaustiveness handles Never separately from other no-valued types #50729
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 4.2
Environment
Apple Swift version 4.2 (swiftlang-1000.0.25.1 clang-1000.10.28.1)
Target: x86_64-apple-darwin17.6.0
Additional Detail from JIRA
md5: 8dac1ec8317572716c99c92e1f1dd897
duplicates:
Issue Description:
In Swift 4.1, Swift's switch exhaustiveness checker is happy to let you skip handling cases that cannot be constructed (because they involve a type with no values). Swift 4.2 has a regression where it only lets you skip the case if the type involved is
Never
but does not let you skip the case anymore if the type is some other no-valued type.Reproduction:
This compiles just fine in Swift 4.1 but fails in Swift 4.2 with the error
The text was updated successfully, but these errors were encountered: