Patch 8.2.1159

2 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 8, 2020, 12:38:43 PM7/8/20
to vim...@googlegroups.com

Patch 8.2.1159
Problem: Vim9: no error for missing space after a comma.
Solution: Check for white space.
Files: src/vim9compile.c, src/testdir/test_vim9_expr.vim,
src/testdir/test_vim9_script.vim


*** ../vim-8.2.1158/src/vim9compile.c 2020-07-08 17:47:51.927988841 +0200
--- src/vim9compile.c 2020-07-08 18:24:34.547822967 +0200
***************
*** 3060,3066 ****
--- 3060,3073 ----
break;
++count;
if (*p == ',')
+ {
++p;
+ if (*p != ']' && !IS_WHITE_OR_NUL(*p))
+ {
+ semsg(_(e_white_after), ",");
+ return FAIL;
+ }
+ }
whitep = p;
p = skipwhite(p);
}
*** ../vim-8.2.1158/src/testdir/test_vim9_expr.vim 2020-07-08 17:47:51.927988841 +0200
--- src/testdir/test_vim9_expr.vim 2020-07-08 18:24:58.191742416 +0200
***************
*** 1014,1019 ****
--- 1014,1020 ----

call CheckDefExecFailure(["let x = g:anint[3]"], 'E714:')
call CheckDefFailure(["let x = g:list_mixed[xxx]"], 'E1001:')
+ call CheckDefFailure(["let x = [1,2,3]"], 'E1069:')
call CheckDefExecFailure(["let x = g:list_mixed['xx']"], 'E39:')
call CheckDefFailure(["let x = g:list_mixed[0"], 'E111:')
call CheckDefExecFailure(["let x = g:list_empty[3]"], 'E684:')
*** ../vim-8.2.1158/src/testdir/test_vim9_script.vim 2020-07-08 15:16:15.534128895 +0200
--- src/testdir/test_vim9_script.vim 2020-07-08 18:28:23.347051927 +0200
***************
*** 571,577 ****

def Test_try_catch_fails()
call CheckDefFailure(['catch'], 'E603:')
! call CheckDefFailure(['try', 'echo 0', 'catch','catch'], 'E1033:')
call CheckDefFailure(['try', 'echo 0', 'catch /pat'], 'E1067:')
call CheckDefFailure(['finally'], 'E606:')
call CheckDefFailure(['try', 'echo 0', 'finally', 'echo 1', 'finally'], 'E607:')
--- 571,577 ----

def Test_try_catch_fails()
call CheckDefFailure(['catch'], 'E603:')
! call CheckDefFailure(['try', 'echo 0', 'catch', 'catch'], 'E1033:')
call CheckDefFailure(['try', 'echo 0', 'catch /pat'], 'E1067:')
call CheckDefFailure(['finally'], 'E606:')
call CheckDefFailure(['try', 'echo 0', 'finally', 'echo 1', 'finally'], 'E607:')
*** ../vim-8.2.1158/src/version.c 2020-07-08 18:34:51.193774339 +0200
--- src/version.c 2020-07-08 18:37:09.009391817 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1159,
/**/

--
Bad fashion can discourage normal people from interacting with the engineer
and talking about the cute things their children do.
(Scott Adams - The Dilbert principle)

/// 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