Skip to content

Adjust test cases for fixed enum case rename #1471

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

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jun 9, 2024

Linked to swiftlang/swift-syntax#2678 and swiftlang/swift#74241


Enum case rename is fixed by changes in sourcekitd. We can remove our workaround for the issue and add test cases that test the rename behavior.

Fixes #1228
rdar://127646036

@ahoppen
Copy link
Member Author

ahoppen commented Jun 9, 2024

Comment on lines 1220 to +1224
newName: "newName(_:)",
expectedPrepareRenamePlaceholder: "myCase",
expectedPrepareRenamePlaceholder: "myCase(label:)",
expected: """
enum MyEnum {
case newName(_ label: String)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be dropping the label completely here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it’s valuable to keep it as an internal label, similar to what we do for function completion (and yes, also easier to implement 🙈)

Enum case rename is fixed by changes in sourcekitd. We can remove our workaround for the issue and add test cases that test the rename behavior.

Fixes swiftlang#1228
rdar://127646036
@ahoppen ahoppen force-pushed the enum-case-rename branch from bd7e9e3 to 7a61ff9 Compare June 12, 2024 02:21
@ahoppen
Copy link
Member Author

ahoppen commented Jun 12, 2024

swiftlang/swift#74241
#1471

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Jun 12, 2024

@ahoppen
Copy link
Member Author

ahoppen commented Jun 12, 2024

swiftlang/swift-syntax#2678
swiftlang/swift#74241

@swift-ci Please test Windows

@ahoppen
Copy link
Member Author

ahoppen commented Jun 12, 2024

@ahoppen
Copy link
Member Author

ahoppen commented Jun 12, 2024

@ahoppen ahoppen merged commit 2d2bac8 into swiftlang:main Jun 12, 2024
3 checks passed
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.

Support renaming argument labels of enum cases
2 participants