mirror of
https://github.com/vim/vim.git
synced 2025-10-05 05:34:07 -04:00
patch 8.2.1270: Vim9: not skipping over function type declaration
Problem: Vim9: not skipping over function type declaration with only a return type. Solution: Skip over the return type. (issue #6507)
This commit is contained in:
@@ -260,6 +260,16 @@ def Test_call_funcref()
|
||||
assert_equal(3, g:SomeFunc('abc'))
|
||||
assert_fails('NotAFunc()', 'E117:')
|
||||
assert_fails('g:NotAFunc()', 'E117:')
|
||||
|
||||
let lines =<< trim END
|
||||
vim9script
|
||||
def RetNumber(): number
|
||||
return 123
|
||||
enddef
|
||||
let Funcref: func: number = function('RetNumber')
|
||||
assert_equal(123, Funcref())
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
let SomeFunc = function('len')
|
||||
|
Reference in New Issue
Block a user