diff src/testdir/test_vim9_func.vim @ 19946:8466e62a2481 v8.2.0529

patch 8.2.0529: Vim9: function argument with default not checked Commit: https://github.com/vim/vim/commit/49cf7cc8d2df1509cbe23647166c6cc954d59513 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 7 22:45:00 2020 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Tue, 07 Apr 2020 23:00:04 +0200
parents 3055cd26e139
children 4e8e0ce576af
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
@@ -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