File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2020,8 +2020,7 @@ bool ContextualFailure::diagnoseAsError() {
2020
2020
}
2021
2021
2022
2022
case ConstraintLocator::RValueAdjustment: {
2023
- auto &cs = getConstraintSystem ();
2024
-
2023
+ auto &solution = getSolution ();
2025
2024
auto overload = getOverloadChoiceIfAvailable (
2026
2025
getConstraintLocator (anchor, ConstraintLocator::UnresolvedMember));
2027
2026
if (!(overload && overload->choice .isDecl ()))
@@ -2047,8 +2046,11 @@ bool ContextualFailure::diagnoseAsError() {
2047
2046
2048
2047
auto params = fnType->getParams ();
2049
2048
2050
- ParameterListInfo info (params, choice,
2051
- hasAppliedSelf (cs, overload->choice ));
2049
+ ParameterListInfo info (
2050
+ params, choice,
2051
+ hasAppliedSelf (overload->choice , [&solution](Type type) {
2052
+ return solution.simplifyType (type);
2053
+ }));
2052
2054
auto numMissingArgs = llvm::count_if (
2053
2055
indices (params), [&info](const unsigned paramIdx) -> bool {
2054
2056
return !info.hasDefaultArgument (paramIdx);
You can’t perform that action at this time.
0 commit comments