0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.2.3897: Vim9: second argument of map() and filter() not checked

Problem:    Vim9: the second argument of map() and filter() is not checked at
            compile time.
Solution:   Add more specific type check for the second argument.
This commit is contained in:
Bram Moolenaar
2021-12-25 21:43:28 +00:00
parent db8e5c21b9
commit 1802405d71
7 changed files with 80 additions and 12 deletions

View File

@@ -2048,7 +2048,7 @@ def Test_vim9script_funcref_other_script()
return idx % 2 == 1
enddef
export def FastFilter(): list<number>
return range(10)->filter('FilterFunc')
return range(10)->filter('FilterFunc(v:key, v:val)')
enddef
export def FastFilterDirect(): list<number>
return range(10)->filter(FilterFunc)