Skip to content

[ConstraintSystem] Allow getPotentialBindings to find supertypes of o… #20014

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
Oct 24, 2018
Merged

[ConstraintSystem] Allow getPotentialBindings to find supertypes of o… #20014

merged 1 commit into from
Oct 24, 2018

Conversation

rudkx
Copy link
Contributor

@rudkx rudkx commented Oct 24, 2018

…ptionals.

Improve enumerateDirectSupertypes so that for T? it will return U? if
U is a supertype of T. This is another form of direct supertype.

This is making up for a deficiency in the completeness of our Type
join implementation, which should be able to directly compute a join
of disparate types that share some common supertype, but sometimes
fails to in cases involving protocol compositions.

Fixes rdar://problem/45490737

…ptionals.

Improve enumerateDirectSupertypes so that for T? it will return U? if
U is a supertype of T. This is another form of direct supertype.

This is making up for a deficiency in the completeness of our Type
join implementation, which should be able to directly compute a join
of disparate types that share some common supertype, but sometimes
fails to in cases involving protocol compositions.

Fixes rdar://problem/45490737
@rudkx rudkx requested a review from xedin October 24, 2018 05:47
@rudkx
Copy link
Contributor Author

rudkx commented Oct 24, 2018

@swift-ci Please smoke test

@rudkx
Copy link
Contributor Author

rudkx commented Oct 24, 2018

@swift-ci Please test source compatibility

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rudkx
Copy link
Contributor Author

rudkx commented Oct 24, 2018

The source compatibility failure here seems to be hitting on all PR testing.

@rudkx rudkx merged commit 8315c30 into swiftlang:master Oct 24, 2018
@rudkx rudkx deleted the rdar45490737 branch October 24, 2018 15:10
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