@@ -1675,39 +1675,6 @@ namespace {
1675
1675
};
1676
1676
} // end anonymous namespace
1677
1677
1678
- static bool diagnoseClosureExplicitParameterMismatch (
1679
- ConstraintSystem &CS, SourceLoc loc,
1680
- ArrayRef<AnyFunctionType::Param> params,
1681
- ArrayRef<AnyFunctionType::Param> args) {
1682
- // We are not trying to diagnose structural problems with top-level
1683
- // arguments here.
1684
- if (params.size () != args.size ())
1685
- return false ;
1686
-
1687
- for (unsigned i = 0 , n = params.size (); i != n; ++i) {
1688
- auto paramType = params[i].getOldType ();
1689
- auto argType = args[i].getOldType ();
1690
-
1691
- if (auto paramFnType = paramType->getAs <AnyFunctionType>()) {
1692
- if (auto argFnType = argType->getAs <AnyFunctionType>())
1693
- return diagnoseClosureExplicitParameterMismatch (
1694
- CS, loc, paramFnType->getParams (), argFnType->getParams ());
1695
- }
1696
-
1697
- if (!paramType || !argType || isUnresolvedOrTypeVarType (paramType) ||
1698
- isUnresolvedOrTypeVarType (argType))
1699
- continue ;
1700
-
1701
- if (!TypeChecker::isConvertibleTo (argType, paramType, CS.DC )) {
1702
- CS.getASTContext ().Diags .diagnose (loc, diag::types_not_convertible,
1703
- false , paramType, argType);
1704
- return true ;
1705
- }
1706
- }
1707
-
1708
- return false ;
1709
- }
1710
-
1711
1678
// / Check if there failure associated with expression is related
1712
1679
// / to given contextual type.
1713
1680
bool FailureDiagnosis::diagnoseCallContextualConversionErrors (
0 commit comments