File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -6281,10 +6281,9 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
62816281 auto archetype = dyn_cast<ElementArchetypeType>(type);
62826282 if (!archetype)
62836283 return type;
6284- if (!archetype->isRoot ())
6285- return Type ();
62866284
6287- auto it = allOpened.find (type->getCanonicalType ());
6285+ auto root = archetype->getRoot ();
6286+ auto it = allOpened.find (root->getCanonicalType ());
62886287 assert (it != allOpened.end ());
62896288
62906289 auto pack = it->second ;
@@ -6295,7 +6294,13 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
62956294 } else {
62966295 assert (!indexedShape && " pack substitution doesn't match in shape" );
62976296 }
6298- return packElementType;
6297+
6298+ if (archetype->isRoot ())
6299+ return packElementType;
6300+
6301+ return archetype->getInterfaceType ()->castTo <DependentMemberType>()
6302+ ->substRootParam (packElementType, LookUpConformanceInModule (),
6303+ std::nullopt );
62996304 };
63006305
63016306 // If the pack components and expected element types are SIL types,
You can’t perform that action at this time.
0 commit comments