patch 8.2.2173: Vim9: get internal error when assigning to undefined variable
Problem: Vim9: get internal error when assigning to undefined variable.
Solution: Add error message. (closes #7475)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 9bd3698..133a09c 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -7681,8 +7681,9 @@
// Expression or function call.
if (ea.cmdidx != CMD_eval)
{
- // CMD_var cannot happen, compile_assignment() above is used
- iemsg("Command from find_ex_command() not handled");
+ // CMD_var cannot happen, compile_assignment() above would be
+ // used. Most likely an assignment to a non-existing variable.
+ semsg(_(e_command_not_recognized_str), ea.cmd);
goto erret;
}
}