Skip to content

Commit 3dff3e5

Browse files
committed
[CSSimplify] Avoid eager matching between pack expansion and its contextual type
This is effectively a premature optimization. Contextual type might not be fully resolved yet, so let's give solver a chance to do it for us.
1 parent 043d2aa commit 3dff3e5

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11619,17 +11619,6 @@ bool ConstraintSystem::resolvePackExpansion(TypeVariableType *typeVar,
1161911619
.getOpenedType();
1162011620

1162111621
assignFixedType(typeVar, openedExpansionType, locator);
11622-
11623-
// We have a fully resolved contextual pack expansion type, let's
11624-
// apply it right away.
11625-
if (!contextualType->isEqual(openedExpansionType)) {
11626-
assert(contextualType->is<PackExpansionType>() &&
11627-
!contextualType->hasTypeVariable());
11628-
auto result = matchTypes(openedExpansionType, contextualType,
11629-
ConstraintKind::Equal, {}, locator);
11630-
return !result.isFailure();
11631-
}
11632-
1163311622
return true;
1163411623
}
1163511624

0 commit comments

Comments
 (0)