Skip to content

Commit b949c67

Browse files
committed
IRGen: Slightly more accurate isLeafTypeMetadata() for nested nominal types
1 parent ab0d531 commit b949c67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/IRGen/Fulfillment.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ static bool isLeafTypeMetadata(CanType type) {
7070
case TypeKind::Tuple:
7171
return cast<TupleType>(type)->getNumElements() == 0;
7272

73-
// Nominal types might have parents.
73+
// Nominal types might have generic parents.
7474
case TypeKind::Class:
7575
case TypeKind::Enum:
7676
case TypeKind::Protocol:
7777
case TypeKind::Struct:
78-
return !cast<NominalType>(type)->getParent();
78+
return !cast<NominalType>(type)->getDecl()->isGenericContext();
7979

8080
// Bound generic types have type arguments.
8181
case TypeKind::BoundGenericClass:

0 commit comments

Comments
 (0)