We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xcode 10 public release
md5: 98c391b302466107429c1603cf5d9378
duplicates:
Issue Description:
The following code compiles even though the switch is not exhaustive. (It is missing a (.eleven, _) case at the bottom).
It also generates a fatal error in certain cases (documented below).
import Foundation enum Example: Equatable { case one case two case three case four case five case six case seven case eight case nine case ten case eleven static func == (lhs: Example, rhs: Example) -> Bool { switch (lhs, rhs) { case (.one, .one): return true case (.two, .two): return true case (.three, .three): return true case (.four, .four): return true case (.five, .five): return true case (.six, .six): return true case (.seven, .seven): return true case (.eight, .eight): return true case (.nine, .nine): return true case (.ten, .ten): return true case (.eleven, .eleven): return true case (.one, _), (.two, _), (.three, _), (.four, _), (.five, _), (.six, _), (.seven, _), (.eight, _), (.nine, _), (.ten, _): return false } } } print(Example.one == Example.eleven) // false (correct) print(Example.eleven == Example.one) // Thread 1: Fatal error: unexpected enum case while switching on value of type '(Example, Example)'
The text was updated successfully, but these errors were encountered:
cc @xedin. I think we have one like this already?
Sorry, something went wrong.
Yes, looks like this is a duplicate of SR-6316
No branches or pull requests
Environment
Xcode 10 public release
Additional Detail from JIRA
md5: 98c391b302466107429c1603cf5d9378
duplicates:
Issue Description:
The following code compiles even though the switch is not exhaustive. (It is missing a (.eleven, _) case at the bottom).
It also generates a fatal error in certain cases (documented below).
The text was updated successfully, but these errors were encountered: