Skip to content

[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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

a7medev
Copy link
Contributor

@a7medev a7medev commented Aug 11, 2025

Note

This PR depends on #83646 and it should be set as this PR's base but GitHub doesn't allow this.
Commit 5376af0 is the only change added in this PR.

The swift::ide::eraseArchetypes function 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 .self and .Type and more generally for types without an explicit generic signature attached.

a7medev added 5 commits August 1, 2025 01:14
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
@a7medev a7medev force-pushed the feat/generalize-erase-archetypes branch from 5376af0 to 4e2cb0b Compare August 16, 2025 22:29
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.

1 participant