diff src/vim9compile.c @ 23254:4b7e996354e0 v8.2.2173

patch 8.2.2173: Vim9: get internal error when assigning to undefined variable Commit: https://github.com/vim/vim/commit/52c124d3303d3cc3e4504708881906d17d6d6c55 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 20 21:43:35 2020 +0100 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 https://github.com/vim/vim/issues/7475)
author Bram Moolenaar <Bram@vim.org>
date Sun, 20 Dec 2020 21:45:04 +0100
parents ac934fbacc0e
children 00f7cd9b6033
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -7681,8 +7681,9 @@ compile_def_function(ufunc_T *ufunc, int
 	    // 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;
 	    }
 	}