File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -141,16 +141,11 @@ PackExpansionType *PackExpansionType::expand() {
141
141
}
142
142
143
143
CanType PackExpansionType::getReducedShape () {
144
- if (auto *archetypeType = countType->getAs <PackArchetypeType>()) {
145
- auto shape = archetypeType->getReducedShape ();
146
- return CanType (PackExpansionType::get (shape, shape));
147
- } else if (auto *packType = countType->getAs <PackType>()) {
148
- auto shape = packType->getReducedShape ();
149
- return CanType (PackExpansionType::get (shape, shape));
150
- }
144
+ auto reducedShape = countType->getReducedShape ();
145
+ if (reducedShape == getASTContext ().TheEmptyTupleType )
146
+ return reducedShape;
151
147
152
- assert (countType->is <PlaceholderType>());
153
- return getASTContext ().TheEmptyTupleType ;
148
+ return CanType (PackExpansionType::get (reducedShape, reducedShape));
154
149
}
155
150
156
151
bool TupleType::containsPackExpansionType () const {
You can’t perform that action at this time.
0 commit comments