1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2020-12-20 21:43:35 +01:00
parent 5082471f91
commit 52c124d330
5 changed files with 19 additions and 4 deletions

View File

@@ -7681,8 +7681,9 @@ compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx)
// 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;
}
}