Skip to content

Commit a25e2cd

Browse files
authored
Merge pull request #35725 from hborla/solver-known-arg-type-heuristic
[ConstraintSystem] Tweak the generic operator partition heuristic.
2 parents 2a05803 + a9e300b commit a25e2cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Sema/CSSolver.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2135,7 +2135,9 @@ void ConstraintSystem::partitionGenericOperators(ArrayRef<Constraint *> constrai
21352135
// overload choices first.
21362136
for (auto arg : argFnType->getParams()) {
21372137
auto argType = arg.getPlainType();
2138-
if (!argType || argType->hasTypeVariable())
2138+
argType = getFixedTypeRecursive(argType, /*wantRValue=*/true);
2139+
2140+
if (argType->isTypeVariableOrMember())
21392141
continue;
21402142

21412143
if (conformsToKnownProtocol(DC, argType, KnownProtocolKind::AdditiveArithmetic)) {

0 commit comments

Comments
 (0)