@@ -3440,6 +3440,8 @@ ExistentialMetatypeType::get(Type T, Optional<MetatypeRepresentation> repr,
34403440 T = existential->getConstraintType ();
34413441
34423442 auto properties = T->getRecursiveProperties ();
3443+ if (T->is <ParameterizedProtocolType>())
3444+ properties |= RecursiveTypeProperties::HasParameterizedExistential;
34433445 auto arena = getArena (properties);
34443446
34453447 unsigned reprKey;
@@ -3535,7 +3537,7 @@ isAnyFunctionTypeCanonical(ArrayRef<AnyFunctionType::Param> params,
35353537static RecursiveTypeProperties
35363538getGenericFunctionRecursiveProperties (ArrayRef<AnyFunctionType::Param> params,
35373539 Type result) {
3538- static_assert (RecursiveTypeProperties::BitWidth == 13 ,
3540+ static_assert (RecursiveTypeProperties::BitWidth == 14 ,
35393541 " revisit this if you add new recursive type properties" );
35403542 RecursiveTypeProperties properties;
35413543
@@ -4124,7 +4126,7 @@ CanSILFunctionType SILFunctionType::get(
41244126 void *mem = ctx.Allocate (bytes, alignof (SILFunctionType));
41254127
41264128 RecursiveTypeProperties properties;
4127- static_assert (RecursiveTypeProperties::BitWidth == 13 ,
4129+ static_assert (RecursiveTypeProperties::BitWidth == 14 ,
41284130 " revisit this if you add new recursive type properties" );
41294131 for (auto ¶m : params)
41304132 properties |= param.getInterfaceType ()->getRecursiveProperties ();
@@ -4242,6 +4244,8 @@ Type ExistentialType::get(Type constraint, bool forceExistential) {
42424244 assert (constraint->isConstraintType ());
42434245
42444246 auto properties = constraint->getRecursiveProperties ();
4247+ if (constraint->is <ParameterizedProtocolType>())
4248+ properties |= RecursiveTypeProperties::HasParameterizedExistential;
42454249 auto arena = getArena (properties);
42464250
42474251 auto &entry = C.getImpl ().getArena (arena).ExistentialTypes [constraint];
0 commit comments