File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -163,9 +163,15 @@ class TypeDecoder {
163
163
case NodeKind::BoundGenericClass:
164
164
{
165
165
#if SWIFT_OBJC_INTEROP
166
- if (Node->getNumChildren () == 2 )
167
- if (auto mangledName = getObjCClassOrProtocolName (Node->getChild (0 )))
166
+ if (Node->getNumChildren () >= 2 ) {
167
+ auto ChildNode = Node->getChild (0 );
168
+ if (ChildNode->getKind () == NodeKind::Type &&
169
+ ChildNode->getNumChildren () > 0 )
170
+ ChildNode = ChildNode->getChild (0 );
171
+
172
+ if (auto mangledName = getObjCClassOrProtocolName (ChildNode))
168
173
return Builder.createObjCClassType (mangledName->str ());
174
+ }
169
175
#endif
170
176
LLVM_FALLTHROUGH;
171
177
}
Original file line number Diff line number Diff line change @@ -108,5 +108,9 @@ DemangleToMetadataTests.test("runtime conformance check for @objc protocol inher
108
108
expectEqual ( F< P3> . self , _typeByName ( " 4main1FCyAA2P3PG " ) !)
109
109
}
110
110
111
+ DemangleToMetadataTests . test ( " Objective-C generics " ) {
112
+ expectEqual ( NSArray . self, _typeByName ( " So7NSArrayCySo8NSStringCG " ) !)
113
+ }
114
+
111
115
runAllTests ( )
112
116
You can’t perform that action at this time.
0 commit comments