Fix #561 where statements that eval to false do not show incorrect usage location

This commit is contained in:
gingerBill
2020-05-13 23:45:55 +01:00
parent d59fced21b
commit c2bfb221f5
3 changed files with 33 additions and 2 deletions

View File

@@ -1237,7 +1237,7 @@ void check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *decl, Type *ty
}
bool where_clause_ok = evaluate_where_clauses(ctx, nullptr, decl->scope, &decl->proc_lit->ProcLit.where_clauses, true);
bool where_clause_ok = evaluate_where_clauses(ctx, nullptr, decl->scope, &decl->proc_lit->ProcLit.where_clauses, !decl->where_clauses_evaluated);
if (!where_clause_ok) {
// NOTE(bill, 2019-08-31): Don't check the body as the where clauses failed
return;