Skip to content

[5.7] [Cherry-pick] Do not suggest moving any or some to the beginning of a composition if the first type is already an existential or opaque type #59097

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
May 26, 2022

Conversation

LucianoPAlmeida
Copy link
Contributor

Cherry-pick #58742


When some or any appear within a composition instead of at the beginning, the compiler suggests moving the keyword to the beginning. If either of the keywords already appear at the beginning of the composition, the code after the application of the fix-it will be syntactically incorrect.

This change checks if some or any are already specified at the beginning of the composition and, if yes, simply suggests to remove the occurrence within the composition instead of moving it to the beginning

cc @moritzdietsche

…on if the first type is already an existential or opaque type.
@LucianoPAlmeida LucianoPAlmeida requested a review from hborla May 26, 2022 02:38
@LucianoPAlmeida LucianoPAlmeida requested a review from a team as a code owner May 26, 2022 02:38
@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci Please test

Copy link
Member

@hborla hborla left a comment

Choose a reason for hiding this comment

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

Thank you!

@LucianoPAlmeida LucianoPAlmeida merged commit 177515f into swiftlang:release/5.7 May 26, 2022
@LucianoPAlmeida LucianoPAlmeida deleted the 58741-to5-7 branch May 26, 2022 13:38
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.7 labels Jan 9, 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.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants