Mercurial > vim
diff src/testdir/test_vim9_func.vim @ 25543:a84e75d73fde v8.2.3308
patch 8.2.3308: Vim9: no runtime check for argument type with varargs only
Commit: https://github.com/vim/vim/commit/6ce46b99635877fb0a17c06a6f5625fbc1ffa6f4
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 7 15:35:36 2021 +0200
patch 8.2.3308: Vim9: no runtime check for argument type with varargs only
Problem: Vim9: no runtime check for argument type if a function only has
varargs.
Solution: Also check argument types if uf_va_type is set. (closes #8715)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 07 Aug 2021 15:45:02 +0200 |
parents | 911fdca7f736 |
children | 164cef0bc7ab |
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -1149,6 +1149,18 @@ def Test_call_def_varargs() enddef END CheckScriptFailure(lines, 'E1160:') + + lines =<< trim END + vim9script + def DoIt() + g:Later('') + enddef + defcompile + def g:Later(...l: list<number>) + enddef + DoIt() + END + CheckScriptFailure(lines, 'E1013: Argument 1: type mismatch, expected number but got string') enddef let s:value = ''