Merge pull request #62123 from DougGregor/pretty-stack-trace-macros

This commit is contained in:
Doug Gregor
2022-11-15 19:26:24 -08:00
committed by GitHub
3 changed files with 23 additions and 15 deletions

View File

@@ -5541,10 +5541,12 @@ bool ConstraintSystem::repairFailures(
if (auto overload = findSelectedOverloadFor(calleeLocator)) {
if (auto *decl = overload->choice.getDeclOrNull()) {
if (getParameterList(decl)->get(paramIdx)->getTypeOfDefaultExpr()) {
conversionsOrFixes.push_back(
IgnoreDefaultExprTypeMismatch::create(*this, lhs, rhs, loc));
break;
if (auto paramList = getParameterList(decl)) {
if (paramList->get(paramIdx)->getTypeOfDefaultExpr()) {
conversionsOrFixes.push_back(
IgnoreDefaultExprTypeMismatch::create(*this, lhs, rhs, loc));
break;
}
}
}
}