Mercurial > vim
changeset 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 | 5ab01f8473b2 |
children | c998116fceb8 |
files | src/testdir/test_vim9_expr.vim src/version.c src/vim9compile.c |
diffstat | 3 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -1420,7 +1420,7 @@ func Test_expr_fails() call CheckDefFailure(["let x = '1'is2"], 'E488:') call CheckDefFailure(["let x = '1'isnot2"], 'E488:') - call CheckDefExecFailure(["CallMe ('yes')"], 'E492:') + call CheckDefFailure(["CallMe ('yes')"], 'E476:') call CheckDefFailure(["CallMe2('yes','no')"], 'E1069:') call CheckDefFailure(["CallMe2('yes' , 'no')"], 'E1068:')
--- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1156, +/**/ 1155, /**/ 1154,
--- 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;