From c6c0c9bfdf45746a0b7ba7de0163142144b4bebc Mon Sep 17 00:00:00 2001 From: David Adam Date: Tue, 9 Apr 2019 20:10:25 +0800 Subject: [PATCH] use standard warning for invalid variable in for loop Work on #5800. --- src/parse_execution.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse_execution.cpp b/src/parse_execution.cpp index db0e620cb..06ed5bf00 100644 --- a/src/parse_execution.cpp +++ b/src/parse_execution.cpp @@ -397,7 +397,7 @@ parse_execution_result_t parse_execution_context_t::run_for_statement( } if (!valid_var_name(for_var_name)) { - report_error(var_name_node, L"invalid var name: %ls", for_var_name.c_str()); + report_error(var_name_node, BUILTIN_ERR_VARNAME, L"for", for_var_name.c_str()); return parse_execution_errored; }