Patch 8.2.1156

3 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 8, 2020, 11:48:46 AM7/8/20
to vim...@googlegroups.com

Patch 8.2.1156
Problem: Vim9: No error for invalid command in compiled function.
Solution: Handle CMD_SIZE.
Files: src/vim9compile.c, src/testdir/test_vim9_expr.vim


*** ../vim-8.2.1155/src/vim9compile.c 2020-07-08 17:36:17.734105013 +0200
--- src/vim9compile.c 2020-07-08 17:42:22.548967928 +0200
***************
*** 7142,7147 ****
--- 7142,7151 ----

// 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;
*** ../vim-8.2.1155/src/testdir/test_vim9_expr.vim 2020-07-05 16:51:23.610238546 +0200
--- src/testdir/test_vim9_expr.vim 2020-07-08 17:46:03.136308944 +0200
***************
*** 1420,1426 ****
call CheckDefFailure(["let x = '1'is2"], 'E488:')
call CheckDefFailure(["let x = '1'isnot2"], 'E488:')

! call CheckDefExecFailure(["CallMe ('yes')"], 'E492:')
call CheckDefFailure(["CallMe2('yes','no')"], 'E1069:')
call CheckDefFailure(["CallMe2('yes' , 'no')"], 'E1068:')

--- 1420,1426 ----
call CheckDefFailure(["let x = '1'is2"], 'E488:')
call CheckDefFailure(["let x = '1'isnot2"], 'E488:')

! call CheckDefFailure(["CallMe ('yes')"], 'E476:')
call CheckDefFailure(["CallMe2('yes','no')"], 'E1069:')
call CheckDefFailure(["CallMe2('yes' , 'no')"], 'E1068:')

*** ../vim-8.2.1155/src/version.c 2020-07-08 17:36:17.738105000 +0200
--- src/version.c 2020-07-08 17:46:22.264252490 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1156,
/**/

--
EXPERIENCE - experience is a wonderful thing. It enables you to
recognise a mistake when you make it again.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages