Skip to content

Commit 866737e

Browse files
committed
SIL: Fix substWitnessConformance() to set SubstFlags::PreservePackExpansionLevel
1 parent da49310 commit 866737e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/SIL/IR/SILTypeSubstitution.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,10 @@ class SILTypeSubstituter :
273273
// Substitute the underlying conformance of opaque type archetypes if we
274274
// should look through opaque archetypes.
275275
if (typeExpansionContext.shouldLookThroughOpaqueTypeArchetypes()) {
276-
auto substType = IFS.withNewOptions(std::nullopt, [&] {
277-
return selfType.subst(IFS)->getCanonicalType();
278-
});
276+
auto substType = IFS.withNewOptions(
277+
SubstFlags::PreservePackExpansionLevel, [&] {
278+
return selfType.subst(IFS)->getCanonicalType();
279+
});
279280
if (substType->hasOpaqueArchetype()) {
280281
substConformance = substOpaqueTypesWithUnderlyingTypes(
281282
substConformance, typeExpansionContext);

0 commit comments

Comments
 (0)