File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -136,13 +136,19 @@ std::string GenericSignatureBuilder::PotentialArchetype::getDebugName() const {
136
136
// Nested types.
137
137
result += parent->getDebugName ();
138
138
139
- // When building the name for debugging purposes, include the
140
- // protocol into which the associated type was resolved.
139
+ // When building the name for debugging purposes, include the protocol into
140
+ // which the associated type or type alias was resolved.
141
+ ProtocolDecl *proto = nullptr ;
141
142
if (auto assocType = getResolvedAssociatedType ()) {
143
+ proto = assocType->getProtocol ();
144
+ } else if (auto typeAlias = getTypeAliasDecl ()) {
145
+ proto = typeAlias->getParent ()->getAsProtocolOrProtocolExtensionContext ();
146
+ }
147
+
148
+ if (proto) {
142
149
result.push_back (' [' );
143
150
result.push_back (' .' );
144
- result.append (assocType->getProtocol ()->getName ().str ().begin (),
145
- assocType->getProtocol ()->getName ().str ().end ());
151
+ result.append (proto->getName ().str ().begin (), proto->getName ().str ().end ());
146
152
result.push_back (' ]' );
147
153
}
148
154
You can’t perform that action at this time.
0 commit comments