0
0
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:
Bram Moolenaar
2020-04-07 22:45:00 +02:00
parent 0b76b42d0a
commit 49cf7cc8d2
4 changed files with 28 additions and 5 deletions

View File

@@ -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