mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #67692 from artemcm/ConstExtractPrintTypesOutOfContext
[Compile Time Constant Extraction] Map types with archetypes out of context, before mangling them for printing.
This commit is contained in:
@@ -85,7 +85,10 @@ std::string toFullyQualifiedProtocolNameString(const swift::ProtocolDecl &Protoc
|
||||
}
|
||||
|
||||
std::string toMangledTypeNameString(const swift::Type &Type) {
|
||||
return Mangle::ASTMangler().mangleTypeWithoutPrefix(Type->getCanonicalType());
|
||||
auto PrintingType = Type;
|
||||
if (Type->hasArchetype())
|
||||
PrintingType = Type->mapTypeOutOfContext();
|
||||
return Mangle::ASTMangler().mangleTypeWithoutPrefix(PrintingType->getCanonicalType());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user