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> {
6281
6281
auto archetype = dyn_cast<ElementArchetypeType>(type);
6282
6282
if (!archetype)
6283
6283
return type;
6284
- if (!archetype->isRoot ())
6285
- return Type ();
6286
6284
6287
- auto it = allOpened.find (type->getCanonicalType ());
6285
+ auto root = archetype->getRoot ();
6286
+ auto it = allOpened.find (root->getCanonicalType ());
6288
6287
assert (it != allOpened.end ());
6289
6288
6290
6289
auto pack = it->second ;
@@ -6295,7 +6294,13 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
6295
6294
} else {
6296
6295
assert (!indexedShape && " pack substitution doesn't match in shape" );
6297
6296
}
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);
6299
6304
};
6300
6305
6301
6306
// If the pack components and expected element types are SIL types,
You can’t perform that action at this time.
0 commit comments