-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[IDE] Erase archetypes without declaration generic signature #83652
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
[IDE] Erase archetypes without declaration generic signature #83652
Conversation
5376af0 to
4e2cb0b
Compare
7c24e93 to
7d58998
Compare
|
@hamishknight BTW I feel like these comments belong to #83646, I understand that GitHub shows everything in this PR due to the lack of a real base branch 🥲. Should we keep the PRs separate or do we join them? |
|
Yeah sorry I forgot you had split them, I'll leave follow-up feedback on the other PR. The |
26aabc6 to
0357d7d
Compare
This generalization enables curried functions with generic parameters coming from the initial declaration to be printed with the archetype's upperbound rather than '_' unresolved type. As an added benefit, T.self and T.Type for generic parameters now get shown as the upperbound of the generic parameter provided
0357d7d to
491b3a0
Compare
|
@swift-ci please test |
|
@swift-ci please smoke test macOS |
|
@hamishknight I've checked the macOS failure, looks like an issue with swift-docc tests, any idea why that could is happening? |
|
Yeah that's unrelated, let's land this |
Note
This PR depends on #83646 and it should be set as this PR's base but GitHub doesn't allow this.
Commit 5376af0c67aaacf104b54c42575ed03513fe3b92 is the only change added in this PR.
The
swift::ide::eraseArchetypesfunction is used in code completion to replace archetypes with their upper bound for completion string printing.Currently, it checks for a provided generic signature before doing anything and returns immediately if no generic signature is provided. This shouldn't be necessary for archetypes though since they carry their generic signature.
This PR enables more helpful code completion results for things like
.selfand.Typeand more generally for types without an explicit generic signature attached.