Skip to content

Commit

Permalink
update comment wording
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmad Rezaii <[email protected]>
  • Loading branch information
arezaii committed Jan 9, 2025
1 parent 7ab602b commit 7cd3868
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions frontend/lib/resolution/Resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,8 +951,8 @@ handleRejectedCandidates(Context* context,
std::vector<ApplicabilityResult>& rejected,
const resolution::CallInfo& ci,
const uast::Call*& call) {
// There were candidates but we threw them out. We can issue a nicer
// error explaining why each candidate was rejected.
// By performing some processing in the resolver, we can issue a nicer error
// explaining why each candidate was rejected.
std::vector<resolution::FormalActual> badPasses;
std::vector<const uast::VarLikeDecl*> actualDecls;
badPasses.resize(rejected.size());
Expand All @@ -961,8 +961,8 @@ handleRejectedCandidates(Context* context,
for (size_t i = 0; i < rejected.size(); i++) {
auto &candidate = rejected[i];
if (candidate.reason() == resolution::FAIL_CANNOT_PASS &&
/* skip printing detailed info_ here because computing the formal-actual
map will go poorly with an unknown formal. */
/* skip computing the formal-actual map because it will go poorly
with an unknown formal. */
candidate.formalReason() != resolution::FAIL_UNKNOWN_FORMAL_TYPE) {
auto fn = candidate.initialForErr();
resolution::FormalActualMap fa(fn, ci);
Expand Down Expand Up @@ -1996,6 +1996,7 @@ void Resolver::handleResolvedCallPrintCandidates(ResolvedExpression& r,
}

if (!rejected.empty()) {
// There were candidates but we threw them out. Report on those.
handleRejectedCandidates(context, byPostorder, rejected, ci, call);
return;
}
Expand Down

0 comments on commit 7cd3868

Please sign in to comment.