0
0
mirror of https://github.com/vim/vim.git synced 2025-11-01 10:07:16 -04:00

patch 8.2.3230: Vim9: type error when function return type is not known yet

Problem:    Vim9: type error when function return type is not known yet.
Solution:   When return type is unknown, use "any". (closes #8644)
This commit is contained in:
Bram Moolenaar
2021-07-27 22:21:44 +02:00
parent 4490ec4e83
commit f723701de0
3 changed files with 15 additions and 0 deletions

View File

@@ -1172,6 +1172,16 @@ def Test_get()
var F: func = function('min', [[5, 8, 6]])
F->get('name')->assert_equal('min')
F->get('args')->assert_equal([[5, 8, 6]])
var lines =<< trim END
vim9script
def DoThat(): number
var Getqflist: func = function('getqflist', [{id: 42}])
return Getqflist()->get('id', 77)
enddef
assert_equal(0, DoThat())
END
CheckScriptSuccess(lines)
enddef
def Test_getbufinfo()