AST: Pass SubstFlags::PreservePackExpansionLevel in a few more places

This commit is contained in:
Slava Pestov
2024-04-04 14:56:13 -04:00
parent 3630ce7130
commit 082246094b
3 changed files with 12 additions and 5 deletions

View File

@@ -1633,7 +1633,9 @@ SwiftDeclCollector::constructTypeNode(Type T, TypeInitInfo Info) {
ReplaceOpaqueTypesWithUnderlyingTypes replacer(
/*inContext=*/nullptr, ResilienceExpansion::Maximal,
/*isWholeModuleContext=*/false);
T = T.subst(replacer, replacer, SubstFlags::SubstituteOpaqueArchetypes)
T = T.subst(replacer, replacer,
SubstFlags::SubstituteOpaqueArchetypes |
SubstFlags::PreservePackExpansionLevel)
->getCanonicalType();
}
}