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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202007081548.068FmcfP1377514%40masaka.moolenaar.net.

Raspunde prin e-mail lui