Skip to content

Commit a9e300b

Browse files
committed
[ConstraintSystem] Before checking if an argument type to an applied
disjunction conforms to a known protocol, grab its fixed type.
1 parent 3cbf31c commit a9e300b

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)