diff src/vim9compile.c @ 21210:44611891e22c v8.2.1156

patch 8.2.1156: Vim9: No error for invalid command in compiled function Commit: https://github.com/vim/vim/commit/002262f4dee452964190b0d022aa7443f602b288 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 8 17:47:57 2020 +0200 patch 8.2.1156: Vim9: No error for invalid command in compiled function Problem: Vim9: No error for invalid command in compiled function. Solution: Handle CMD_SIZE.
author Bram Moolenaar <Bram@vim.org>
date Wed, 08 Jul 2020 18:00:05 +0200
parents 09377fd59b2e
children bcd08812cde3
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -7142,6 +7142,10 @@ compile_def_function(ufunc_T *ufunc, int
 
 	    // TODO: other commands with an expression argument
 
+	    case CMD_SIZE:
+		    semsg(_("E476: Invalid command: %s"), ea.cmd);
+		    goto erret;
+
 	    default:
 		    // Not recognized, execute with do_cmdline_cmd().
 		    ea.arg = p;