[NFC] AST: Turn getParameterList into a method on ValueDecl

This commit is contained in:
Anthony Latsis
2025-03-19 18:45:32 +00:00
parent 012ac5da5d
commit 3d3b1ca50a
18 changed files with 58 additions and 64 deletions

View File

@@ -1703,7 +1703,7 @@ static ConstraintSystem::TypeMatchResult matchCallArguments(
if (parameterBindings[paramIdx].empty() && callee) {
// Type inference from default value expressions.
{
auto *paramList = getParameterList(callee);
auto *paramList = callee->getParameterList();
if (!paramList)
continue;
@@ -5758,7 +5758,7 @@ bool ConstraintSystem::repairFailures(
// Ignore decls that don't have meaningful parameter lists - this
// matches variables and parameters with function types.
auto *paramList = getParameterList(overload->choice.getDecl());
auto *paramList = overload->choice.getDecl()->getParameterList();
if (!paramList)
return true;
@@ -6052,7 +6052,7 @@ bool ConstraintSystem::repairFailures(
if (auto overload = findSelectedOverloadFor(calleeLocator)) {
if (auto *decl = overload->choice.getDeclOrNull()) {
if (auto paramList = getParameterList(decl)) {
if (auto paramList = decl->getParameterList()) {
if (paramList->get(paramIdx)->getTypeOfDefaultExpr()) {
conversionsOrFixes.push_back(
IgnoreDefaultExprTypeMismatch::create(*this, lhs, rhs, loc));