Skip to content

Commit 35fdbd0

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. (cherry picked from commit 3dff3e5)
1 parent 4224fd1 commit 35fdbd0

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
@@ -11501,17 +11501,6 @@ bool ConstraintSystem::resolvePackExpansion(TypeVariableType *typeVar,
1150111501
.getOpenedType();
1150211502

1150311503
assignFixedType(typeVar, openedExpansionType, locator);
11504-
11505-
// We have a fully resolved contextual pack expansion type, let's
11506-
// apply it right away.
11507-
if (!contextualType->isEqual(openedExpansionType)) {
11508-
assert(contextualType->is<PackExpansionType>() &&
11509-
!contextualType->hasTypeVariable());
11510-
auto result = matchTypes(openedExpansionType, contextualType,
11511-
ConstraintKind::Equal, {}, locator);
11512-
return !result.isFailure();
11513-
}
11514-
1151511504
return true;
1151611505
}
1151711506

0 commit comments

Comments
 (0)