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> {
6284
6284
6285
6285
auto *genericEnv = archetype->getGenericEnvironment ();
6286
6286
auto interfaceTy = archetype->getInterfaceType ();
6287
+ auto rootParamTy = interfaceTy->getRootGenericParam ();
6287
6288
6288
6289
auto root = genericEnv->mapTypeIntoContext (
6289
- interfaceTy-> getRootGenericParam () )->castTo <ElementArchetypeType>();
6290
+ rootParamTy )->castTo <ElementArchetypeType>();
6290
6291
auto it = allOpened.find (root->getCanonicalType ());
6291
6292
assert (it != allOpened.end ());
6292
6293
@@ -6299,12 +6300,12 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
6299
6300
assert (!indexedShape && " pack substitution doesn't match in shape" );
6300
6301
}
6301
6302
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 () );
6308
6309
};
6309
6310
6310
6311
// If the pack components and expected element types are SIL types,
You can’t perform that action at this time.
0 commit comments