Skip to content

Commit 1845d0d

Browse files
committed
[Type Resolution] Wrap parameter packs in PackType when applying generic arguments.
1 parent c1de4c8 commit 1845d0d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Sema/TypeCheckType.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,10 @@ static Type applyGenericArguments(Type type, TypeResolution resolution,
920920
auto arg = found->rhs;
921921
if (auto *expansionType = arg->getAs<PackExpansionType>())
922922
arg = expansionType->getPatternType();
923+
924+
if (arg->isParameterPack())
925+
arg = PackType::getSingletonPackExpansion(arg);
926+
923927
args.push_back(arg);
924928
}
925929
}

0 commit comments

Comments
 (0)