Skip to content

[6.0] Fix renaming enum case parameters with unnamed associated arguments #2691

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 20, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jun 18, 2024

We treated enum case parameters the same way as function parameters and weren’t considering that they can be unlabeled. That caused us to insert eg. `_ ` in front of the case’s type, producing `case myCase(_ String)`, which is invalid. Report `enumCaseParameters` as a special parameter kind so that sourcekitd can work with it.

swiftlang/sourcekit-lsp#1228
@ahoppen
Copy link
Member Author

ahoppen commented Jun 18, 2024

@ahoppen
Copy link
Member Author

ahoppen commented Jun 19, 2024

@ahoppen ahoppen merged commit 89cd4f6 into swiftlang:release/6.0 Jun 20, 2024
3 checks passed
@ahoppen ahoppen deleted the 6.0/enum-case-rename branch June 20, 2024 20:44
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