Skip to content

Commit 7f87e6b

Browse files
committed
[ConstraintSystem] Adjust bindArchetypesFromContext to produce Pack type
This aligns `bindArchetypesFromContext` with `getIdentitySubsitutionMap` and other methods.
1 parent fb574c8 commit 7f87e6b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,6 +1762,8 @@ static void bindArchetypesFromContext(
17621762
auto genericSig = parentDC->getGenericSignatureOfContext();
17631763
for (auto *paramTy : genericSig.getGenericParams()) {
17641764
Type contextTy = cs.DC->mapTypeIntoContext(paramTy);
1765+
if (paramTy->isParameterPack())
1766+
contextTy = PackType::getSingletonPackExpansion(contextTy);
17651767
bindPrimaryArchetype(paramTy, contextTy);
17661768
}
17671769

0 commit comments

Comments
 (0)