Skip to content

Commit 6dca3e9

Browse files
committed
[AST] Fixed ::getReducedShape for SILPackType.
Made TypeBase's implementation dispatch to the implementation specific to SILPackType.
1 parent ddf0936 commit 6dca3e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/AST/ParameterPack.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,11 @@ CanType TypeBase::getReducedShape() {
340340
if (auto *expansionType = getAs<PackExpansionType>())
341341
return expansionType->getReducedShape();
342342

343+
if (auto *silPackType = getAs<SILPackType>()) {
344+
auto can = cast<SILPackType>(silPackType->getCanonicalType());
345+
return can->getReducedShape();
346+
}
347+
343348
SmallVector<Type, 2> rootParameterPacks;
344349
getTypeParameterPacks(rootParameterPacks);
345350

0 commit comments

Comments
 (0)