From c2bfb221f551c081ff0f2114a2a28a3d50dc3e6d Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 13 May 2020 23:45:55 +0100 Subject: Fix #561 `where` statements that eval to false do not show incorrect usage location --- src/check_decl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/check_decl.cpp') 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; -- cgit v1.2.3