-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[4.0] Diagnostics for Minimal and Complete Patterns #9151
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
@swift-ci please test |
Build failed |
Build failed |
Wow, this cherry-pick was pretty bad. I'm gonna rebase and try again. |
@swift-ci please test |
Build failed |
@swift-ci please test |
ERROR(non_exhaustive_switch,none, | ||
"%select{switch must be exhaustive, consider adding |do you want to add }0" | ||
"%select{missing cases|a default clause}1" | ||
"%select{:|?}0 %2", (bool, bool, StringRef)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you drop the last StringRef? we don't need to duplicate the fixit content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing on master first will be awesome. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah. That was leftover from when I thought I could combine this fixit with the other one.
Thanks! I'll shoot a quick pull request over and cherry-pick that in here.
Weird: If you force-push at a branch that becomes even with the one you're targeting a pull request at, it closes it. |
@nkcsgexi These commits are going to be auto-merged anyways, right? I don't think this PR is necessary. |
@CodaFi it seems they won't be auto-merged to swift-4.0-branch, shall we revive the pull request? |
Redoes a phase of type checking to validate patterns for minimality and completeness.
Cherry-picked from #8908, #9121, #9155, and #9180.