diff options
| author | gingerBill <bill@gingerbill.org> | 2020-05-13 23:45:55 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-05-13 23:45:55 +0100 |
| commit | c2bfb221f551c081ff0f2114a2a28a3d50dc3e6d (patch) | |
| tree | 77d54e28b6f46571d7d6f6688ca60a8a1bd987b5 /src/check_decl.cpp | |
| parent | d59fced21b0c94a4a41f0213f62120dbe0f9b710 (diff) | |
Fix #561 `where` statements that eval to false do not show incorrect usage location
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 69e7c563e..f629a0903 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -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; |