-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[QoI] fix diagnosis of non-Optional enum used in optional pattern #4445
New issue
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
Conversation
Hmm, there is a strange test case in
Is this something we should still support? cc @lattner who originally wrote it |
That's weird; we don't want to support anything other than the true optional types in if-let/guard-let. |
Renaming MyOptional to Optional might do the trick. |
Would removing this be a language change that would need to go through swift-evolution? It seems like a bugfix, but conceivably some people could be using it. |
e5ac8f1
to
14dc422
Compare
I pre-emptively updated the commit to simply remove that test. 🙂 On a related note, how would y'all feel about |
@swift-ci please test |
I don't consider this a language change that needs swift-evolution. And, passing a SourceLoc for the initializer seems totally reasonable here. Thanks! |
@DougGregor OK, thanks! If that qualifies as "LGTM", feel free to merge — GitHub won't let me do it for some reason. What's the procedure for nominating changes for Swift 3.0? Do I just make another PR against |
Merged. You can make a PR against the swift-3.0-branch, given it a 3.0 milestone, and assign to @tkremenek . |
Previously:
Now:
Resolves SR-1456.