Skip to content

[5.5][ConstraintSystem] Simplify relational constraints with the same depe… #37767

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
Jun 4, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jun 3, 2021

…ndent member type on both sides

Cherry-pick of #37699


  • Explanation:

If relational constraint has the same dependent member type on both
sides e.g. $T1.Element == $T1.Element allow its simplification,
since inference of $T1 results in dependent member being resolved
to the same concrete type. Otherwise constraint system would be left
with this constraint in inactive state if $T1 couldn't be resolved
which results in a crash.

Resolves: rdar://78623338
(cherry picked from commit 1c3d685)

…ndent member type on both sides

If relational constraint has the same dependent member type on both
sides e.g. `$T1.Element == $T1.Element` allow its simplification,
since inference of `$T1` results in dependent member being resolved
to the same concrete type. Otherwise constraint system would be left
with this constraint in inactive state if `$T1` couldn't be resolved
which results in a crash.

Resolves: rdar://78623338
(cherry picked from commit 1c3d685)
@xedin xedin added the r5.5 label Jun 3, 2021
@xedin xedin requested a review from a team as a code owner June 3, 2021 17:03
@xedin
Copy link
Contributor Author

xedin commented Jun 3, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Jun 3, 2021

Build failed
Swift Test Linux Platform
Git Sha - ef5c4db

@xedin
Copy link
Contributor Author

xedin commented Jun 3, 2021

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

swift-ci commented Jun 3, 2021

Build failed
Swift Test Linux Platform
Git Sha - ef5c4db

@xedin
Copy link
Contributor Author

xedin commented Jun 3, 2021

@swift-ci please test Linux platform

@DougGregor DougGregor merged commit 974e64a into swiftlang:release/5.5 Jun 4, 2021
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants