Commit Graph

1 Commits

Author SHA1 Message Date
Hamish Knight
994848f6e5 [Mangler] Handle local archetypes in getDeclTypeForMangling
Element archetypes can occur here when mangling the USR for local
variables for e.g SourceKit cursor info, as well as for regular
compilation for things like lazy variables.

Update `getDeclTypeForMangling` to map local archetypes out of
context, using both the captured generic environments and the
archetypes present in the type. More work is needed to support lazy
variable though (now it crashes in SILGen).

This patch doesn't handle mangling standalone element archetypes for
e.g `printTypeUSR`, ideally we'd fix the clients there to not pass
local archetypes.

rdar://143077965
2025-02-26 11:51:20 +00:00