mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Cope with BoundNameAliasType in more places that handle NameAliasType.
This commit is contained in:
@@ -1158,6 +1158,9 @@ static StringRef getTypeName(SDKContext &Ctx, Type Ty,
|
||||
if (auto *NAT = dyn_cast<NameAliasType>(Ty.getPointer())) {
|
||||
return NAT->getDecl()->getNameStr();
|
||||
}
|
||||
if (auto *BNAT = dyn_cast<BoundNameAliasType>(Ty.getPointer())) {
|
||||
return BNAT->getDecl()->getNameStr();
|
||||
}
|
||||
if (Ty->getAnyNominal()) {
|
||||
if (IsImplicitlyUnwrappedOptional) {
|
||||
assert(Ty->getOptionalObjectType());
|
||||
@@ -1360,6 +1363,11 @@ static SDKNode *constructTypeNode(SDKContext &Ctx, Type T,
|
||||
Root->addChild(constructTypeNode(Ctx, NAT->getCanonicalType()));
|
||||
return Root;
|
||||
}
|
||||
if (auto BNAT = dyn_cast<BoundNameAliasType>(T.getPointer())) {
|
||||
SDKNode* Root = SDKNodeInitInfo(Ctx, T).createSDKNode(SDKNodeKind::TypeNameAlias);
|
||||
Root->addChild(constructTypeNode(Ctx, BNAT->getCanonicalType()));
|
||||
return Root;
|
||||
}
|
||||
|
||||
if (auto Fun = T->getAs<AnyFunctionType>()) {
|
||||
SDKNode* Root = SDKNodeInitInfo(Ctx, T).createSDKNode(SDKNodeKind::TypeFunc);
|
||||
|
||||
Reference in New Issue
Block a user