mirror of
https://github.com/vim/vim.git
synced 2025-11-09 10:37:17 -05:00
patch 8.2.0529: Vim9: function argument with default not checked
Problem: Vim9: function argument with default not checked. Solution: Check type of argument with default value.
This commit is contained in:
@@ -128,6 +128,7 @@ def Test_call_def_varargs()
|
||||
assert_equal('one,foo', MyDefVarargs('one'))
|
||||
assert_equal('one,two', MyDefVarargs('one', 'two'))
|
||||
assert_equal('one,two,three', MyDefVarargs('one', 'two', 'three'))
|
||||
call CheckDefFailure(['MyDefVarargs("one", 22)'], 'E1013: argument 2: type mismatch, expected string but got number')
|
||||
enddef
|
||||
|
||||
" Only varargs
|
||||
|
||||
Reference in New Issue
Block a user