Skip to content

Commit 00fd686

Browse files
committed
SIL: Correctly form CanPackExpansionType
1 parent e8336c2 commit 00fd686

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/SIL/IR/SILTypeSubstitution.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ class SILTypeSubstituter :
348348
[&](Type substExpansionShape) {
349349
CanType substComponentType = visit(origType.getPatternType());
350350
if (substExpansionShape) {
351+
if (auto packArchetype = substExpansionShape->getAs<PackArchetypeType>())
352+
substExpansionShape = packArchetype->getReducedShape();
351353
substComponentType = CanPackExpansionType::get(substComponentType,
352354
substExpansionShape->getCanonicalType());
353355
}

0 commit comments

Comments
 (0)