Patch 8.2.1868

4 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 19, 2020, 3:46:01 PM10/19/20
to vim...@googlegroups.com

Patch 8.2.1868
Problem: Vim9: no error for missing space after comma in dict.
Solution: Check for white space. (closes #6672)
Files: src/vim9compile.c, src/testdir/test_vim9_expr.vim


*** ../vim-8.2.1867/src/vim9compile.c 2020-10-19 20:45:32.376596657 +0200
--- src/vim9compile.c 2020-10-19 21:40:18.071921597 +0200
***************
*** 2996,3001 ****
--- 2996,3006 ----
return FAIL;
}
whitep = *arg + 1;
+ if (!IS_WHITE_OR_NUL(*whitep))
+ {
+ semsg(_(e_white_space_required_after_str), ",");
+ return FAIL;
+ }
*arg = skipwhite(*arg + 1);
}

*** ../vim-8.2.1867/src/testdir/test_vim9_expr.vim 2020-10-18 18:03:13.629155053 +0200
--- src/testdir/test_vim9_expr.vim 2020-10-19 21:43:59.683328977 +0200
***************
*** 1880,1885 ****
--- 1880,1886 ----
CheckDefFailure(["var x = #{a : 8}"], 'E1068:', 1)
CheckDefFailure(["var x = #{a :8}"], 'E1068:', 1)
CheckDefFailure(["var x = #{a: 8 , b: 9}"], 'E1068:', 1)
+ CheckDefFailure(["var x = #{a: 1,b: 2}"], 'E1069:', 1)

CheckDefFailure(["var x = #{8: 8}"], 'E1014:', 1)
CheckDefFailure(["var x = #{xxx}"], 'E720:', 1)
*** ../vim-8.2.1867/src/version.c 2020-10-19 20:45:32.376596657 +0200
--- src/version.c 2020-10-19 21:42:38.919544934 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1868,
/**/

--
I AM THANKFUL...
...for all the complaining I hear about the government
because it means we have freedom of speech.

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