Skip to content

Commit 11b29b5

Browse files
committed
RequirementMachine: Preserve isParameterPack() flag in getSubstitutionSchemaFromType() / getRelativeSubstitutionSchemaFromType()
1 parent 88fb887 commit 11b29b5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/AST/RequirementMachine/InterfaceType.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -586,9 +586,10 @@ RewriteContext::getRelativeSubstitutionSchemaFromType(
586586

587587
result.push_back(Term::get(term, *this));
588588

589-
return CanGenericTypeParamType::get(/*isParameterPack=*/ false,
590-
/*depth=*/ 0, index,
591-
Context);
589+
return CanGenericTypeParamType::get(
590+
t->getRootGenericParam()->isParameterPack(),
591+
/*depth=*/ 0, index,
592+
Context);
592593
}));
593594
}
594595

@@ -629,8 +630,9 @@ RewriteContext::getSubstitutionSchemaFromType(CanType concreteType,
629630

630631
result.push_back(Term::get(term, *this));
631632

632-
return CanGenericTypeParamType::get(/*isParameterPack=*/ false,
633-
/*depth=*/0, index,
634-
Context);
633+
return CanGenericTypeParamType::get(
634+
t->getRootGenericParam()->isParameterPack(),
635+
/*depth=*/0, index,
636+
Context);
635637
}));
636638
}

0 commit comments

Comments
 (0)