Skip to content

[SR-7554][4.2] Re-project cast subpatterns #16202

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

Merged
merged 1 commit into from
Apr 27, 2018

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Apr 27, 2018

Cherry-picked from #16199

Original Rationale:

A corner-case left over from an earlier fix that made exhaustiveness
checker aware of irrefutable coercions. If the coercion occured as part
of a sub-pattern, that pattern would be projected with the wrong type
and would fail the intersection test. Project the pattern with the type
of the scrutinee instead.

A corner-case left over from an earlier fix that made exhaustiveness
checker aware of irrefutable coercions.  If the coercion occured as part
of a sub-pattern, that pattern would be projected with the wrong type
and would fail the intersection test.  Project the pattern with the type
of the scrutinee instead.
@CodaFi CodaFi requested a review from xedin April 27, 2018 02:16
@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 27, 2018

@swift-ci test

@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 27, 2018

⛵️

@CodaFi CodaFi merged commit d5256ef into swiftlang:swift-4.2-branch Apr 27, 2018
@CodaFi CodaFi deleted the coercive-compliance branch April 27, 2018 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants