Skip to content

Commit c694697

Browse files
authored
Merge pull request #12252 from xedin/remove-bindparam-hack
[ConstraintSolver] Remove hack related to single parameter handling
2 parents b6b983a + f95c979 commit c694697

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,20 +1037,10 @@ ConstraintSystem::matchFunctionParamTypes(ArrayRef<AnyFunctionType::Param> type1
10371037
// Match up the call arguments to the parameters.
10381038
MatchCallArgumentListener listener;
10391039
SmallVector<ParamBinding, 4> parameterBindings;
1040-
if (constraints::matchCallArguments(type2, type1, defaultMap,
1041-
hasTrailingClosure,
1042-
/*allowFixes=*/false,
1043-
listener,
1044-
parameterBindings)) {
1045-
// FIXME: Sometimes we get asked to bind type variables to parameters.
1046-
// We should not be asked to bind type variables to parameters.
1047-
if (type2.size() == 1 && type2[0].getType()->isTypeVariableOrMember()) {
1048-
return matchTypes(argType, type2[0].getType(),
1049-
ConstraintKind::BindParam,
1050-
subflags, locator);
1051-
}
1040+
if (constraints::matchCallArguments(
1041+
type2, type1, defaultMap, hasTrailingClosure,
1042+
/*allowFixes=*/false, listener, parameterBindings))
10521043
return SolutionKind::Error;
1053-
}
10541044

10551045
// Compare each of the bound arguments for this parameter.
10561046
for (unsigned paramIdx = 0, numParams = parameterBindings.size();

0 commit comments

Comments
 (0)