Skip to content

[RelatedIdents] Fix an assertion failure if two invalid declarations have the same base name #73524

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

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 8, 2024

  • Explanation: For example, the following declarations have the same USR with a single ERROR_TYPE parameter despite being distinct declarations.
func bar(body: Invalid) {}
func bar(ignoreCase: Bool, body: Invalid) {}

We originally intended to check the USR so that local rename behaves more like global rename, which also looks symbols up by USR. But the above example proves that assumption wrong.

…have the same base name

For example, the following declarations have the same USR with a single ERROR_TYPE parameter despite being distinct declarations.

```swift
func bar(body: Invalid) {}
func bar(ignoreCase: Bool, body: Invalid) {}
```

We originally intended to check the USR so that local rename behaves more like global rename, which also looks symbols up by USR. But the above example proves that assumption wrong.

rdar://126803702
@ahoppen ahoppen requested a review from a team as a code owner May 8, 2024 22:26
@ahoppen
Copy link
Member Author

ahoppen commented May 8, 2024

@swift-ci Please test

@ahoppen ahoppen merged commit f39c433 into swiftlang:release/6.0 May 9, 2024
@ahoppen ahoppen deleted the 6.0/related-idents-of-invalid-decls-with-same-base-name branch May 9, 2024 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants