0
0
mirror of https://github.com/vim/vim.git synced 2025-11-07 10:17:28 -05:00

patch 8.2.0564: Vim9: calling a def function from non-vim9 may fail

Problem:    Vim9: calling a def function from non-vim9 may fail.
Solution:   Convert varargs to a list.
This commit is contained in:
Bram Moolenaar
2020-04-12 22:22:31 +02:00
parent 5e774c7579
commit 23e032523e
3 changed files with 32 additions and 1 deletions

View File

@@ -576,6 +576,13 @@ def Test_multiline()
assert_equal('text777one-two', MultiLine('text', 777, 'one', 'two'))
enddef
func Test_multiline_not_vim9()
call assert_equal('text1234', MultiLine('text'))
call assert_equal('text777', MultiLine('text', 777))
call assert_equal('text777one', MultiLine('text', 777, 'one'))
call assert_equal('text777one-two', MultiLine('text', 777, 'one', 'two'))
endfunc
" When using CheckScriptFailure() for the below test, E1010 is generated instead
" of E1056.