Skip to content

[CSBindings] Literal coverage checking should account for type variab… #35701

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
Feb 3, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Feb 2, 2021

…le/hole embedded in optional

Currently isLiteralCoveredBy only checks for top-level type variable or hole.

That check has to be sunk down so it could be used after optionality is stripped
away (when possible), otherwise bindings like $T0? are (incorrectly) determined
to cover literal requirements (because conformance check always succeeds when
attempted on a type variable).

…le/hole embedded in optional

Currently `isLiteralCoveredBy` only checks for top-level type variable or hole.

That check has to be sunk down so it could be used after optionality is stripped
away (when possible), otherwise bindings like `$T0?` are (incorrectly) determined
to cover literal requirements (because conformance check always succeeds when
attempted on a type variable).
@xedin xedin requested a review from hborla February 2, 2021 01:58
@xedin
Copy link
Contributor Author

xedin commented Feb 2, 2021

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Feb 2, 2021

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Feb 2, 2021

@swift-ci please test Windows platform

@xedin
Copy link
Contributor Author

xedin commented Feb 2, 2021

@swift-ci please test source compatibility debug

@xedin
Copy link
Contributor Author

xedin commented Feb 2, 2021

@hborla Source compatibility failure are unrelated to these changes and are due to changes in CFG (they happen in main branch as well).

@xedin xedin merged commit 8803281 into swiftlang:main Feb 3, 2021
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