Patch 8.2.1284

3 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 23, 2020, 2:10:21 PM7/23/20
to vim...@googlegroups.com

Patch 8.2.1284
Problem: Vim9: skipping over type includes following white space, leading
to an error for missing white space.
Solution: Do not skip over white space after the type.
Files: src/vim9compile.c, src/testdir/test_vim9_func.vim


*** ../vim-8.2.1283/src/vim9compile.c 2020-07-23 19:06:18.870925899 +0200
--- src/vim9compile.c 2020-07-23 20:08:32.880258332 +0200
***************
*** 1944,1950 ****
if (p[1] == ':')
p = skip_type(skipwhite(p + 2));
else
! p = skipwhite(p + 1);
}
}
else
--- 1944,1950 ----
if (p[1] == ':')
p = skip_type(skipwhite(p + 2));
else
! ++p;
}
}
else
*** ../vim-8.2.1283/src/testdir/test_vim9_func.vim 2020-07-23 18:26:25.259695152 +0200
--- src/testdir/test_vim9_func.vim 2020-07-23 20:07:58.720434673 +0200
***************
*** 283,288 ****
--- 283,298 ----
assert_equal(123, Bar(Funcref))
END
CheckScriptSuccess(lines)
+
+ lines =<< trim END
+ vim9script
+ def UseNumber(nr: number)
+ echo nr
+ enddef
+ let Funcref: func(number) = function('UseNumber')
+ Funcref(123)
+ END
+ CheckScriptSuccess(lines)
enddef

let SomeFunc = function('len')
*** ../vim-8.2.1283/src/version.c 2020-07-23 19:06:18.874925878 +0200
--- src/version.c 2020-07-23 20:04:09.913616331 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1284,
/**/

--
Q: How many legs does a giraffe have?
A: Eight: two in front, two behind, two on the left and two on the right

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