Skip to content

Commit aecbd80

Browse files
authored
Merge pull request #38319 from mikeash/fix-protocol-conformance-pure-objc-classes-5.5
[5.5][Runtime] Fix protocol conformance checks on pure ObjC classes.
2 parents daf6d57 + b4db7ef commit aecbd80

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stdlib/public/runtime/ProtocolConformance.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ static MetadataResponse getSuperclassForMaybeIncompleteMetadata(
175175
// always fully set up, so we can just skip it and fetch the Subclass field.
176176
if (classMetadata->isTypeMetadata() && classMetadata->isArtificialSubclass())
177177
return {classMetadata->Superclass, MetadataState::Complete};
178+
179+
// Pure ObjC classes are already set up, and the code below will not be
180+
// happy with them.
181+
if (!classMetadata->isTypeMetadata())
182+
return {classMetadata->Superclass, MetadataState::Complete};
178183
#endif
179184

180185
MetadataState metadataState;

0 commit comments

Comments
 (0)