File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -6284,9 +6284,10 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
62846284
62856285 auto *genericEnv = archetype->getGenericEnvironment ();
62866286 auto interfaceTy = archetype->getInterfaceType ();
6287+ auto rootParamTy = interfaceTy->getRootGenericParam ();
62876288
62886289 auto root = genericEnv->mapTypeIntoContext (
6289- interfaceTy-> getRootGenericParam () )->castTo <ElementArchetypeType>();
6290+ rootParamTy )->castTo <ElementArchetypeType>();
62906291 auto it = allOpened.find (root->getCanonicalType ());
62916292 assert (it != allOpened.end ());
62926293
@@ -6299,12 +6300,12 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
62996300 assert (!indexedShape && " pack substitution doesn't match in shape" );
63006301 }
63016302
6302- if ( interfaceTy-> is <GenericTypeParamType>())
6303- return packElementType;
6304-
6305- return interfaceTy-> castTo <DependentMemberType>()
6306- -> substRootParam (packElementType, LookUpConformanceInModule () ,
6307- std:: nullopt );
6303+ return interfaceTy. subst (
6304+ [&](SubstitutableType *type) {
6305+ ASSERT (type-> isEqual (rootParamTy));
6306+ return packElementType;
6307+ } ,
6308+ LookUpConformanceInModule () );
63086309 };
63096310
63106311 // If the pack components and expected element types are SIL types,
You can’t perform that action at this time.
0 commit comments