forked from aniani/vim
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)
This commit is contained in:
@@ -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 = ''
|
||||
|
||||
Reference in New Issue
Block a user