# HG changeset patch # User Bram Moolenaar # Date 1595528104 -7200 # Node ID 49072a858baf495b5c8f3f84799057c135a54400 # Parent f5f1759ddcf43441731d84f8833dec81a67cf37e patch 8.2.1284: Vim9: skipping over type includes following white space Commit: https://github.com/vim/vim/commit/bfba8651a51b66fdc52848f32c77aa925586e250 Author: Bram Moolenaar Date: Thu Jul 23 20:09:10 2020 +0200 patch 8.2.1284: Vim9: skipping over type includes following white space 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. diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim --- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -283,6 +283,16 @@ def Test_call_funcref() 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') diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1284, +/**/ 1283, /**/ 1282, diff --git a/src/vim9compile.c b/src/vim9compile.c --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -1944,7 +1944,7 @@ skip_type(char_u *start) if (p[1] == ':') p = skip_type(skipwhite(p + 2)); else - p = skipwhite(p + 1); + ++p; } } else