-
Notifications
You must be signed in to change notification settings - Fork 10.5k
GSB: Use explicit requirement list in enumerateRequirements() #36598
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
slavapestov
merged 5 commits into
swiftlang:main
from
slavapestov:enumerate-requirements-explicitly
Mar 27, 2021
Merged
GSB: Use explicit requirement list in enumerateRequirements() #36598
slavapestov
merged 5 commits into
swiftlang:main
from
slavapestov:enumerate-requirements-explicitly
Mar 27, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25b29a9
to
41a57b3
Compare
@swift-ci Please test source compatibility |
We can literally have duplicate requirements (same source and RHS) when abstract signatures are built from scratch. They're not flagged as "redundant" since there's no way to distinguish them in the requirement graph, so just filter them out entirely.
This sort of thing is not valid and should never happen: <T where T : P, T == Int>
…protocols If a type parameter both conformed to Error and was required to equal Error, we didn't record a concrete source for the Error conformance. This still produced the right minimized signature because the code in enumerateRequirements() happens to skip all other requirements if an equivalence class was concrete, but we shouldn't rely on that. The bug also meant that we didn't diagnose the redundant conformance requirement.
…e requirements The logic here is pretty expensive, and there's no reason to do it at all if we aren't going to end up with any same-type requirements.
41a57b3
to
524e588
Compare
@swift-ci Please test source compatibility |
@swift-ci Please test compiler performance |
@swift-ci Please test |
@swift-ci Please smoke test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a follow-up to #36576.