mirror of
https://github.com/vim/vim.git
synced 2025-10-07 05:54:16 -04:00
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.
This commit is contained in:
@@ -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')
|
||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1284,
|
||||
/**/
|
||||
1283,
|
||||
/**/
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user