Mercurial > vim
diff src/testdir/test_vim9_script.vim @ 24077:5006d95ef82d v8.2.2580
patch 8.2.2580: Vim9: checking vararg type may be wrong
Commit: https://github.com/vim/vim/commit/e3ffcd9902efc756178900d9bd972c74a09c3fcd
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 8 21:47:13 2021 +0100
patch 8.2.2580: Vim9: checking vararg type may be wrong
Problem: Vim9: checking vararg type is wrong when function is auto-loaded.
Solution: Use the member type. (closes https://github.com/vim/vim/issues/7933)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 08 Mar 2021 22:00:03 +0100 |
parents | da8347e453b4 |
children | a9ff8368d35f |
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -3154,6 +3154,10 @@ def Test_vim9_autoload() return 'test' enddef g:some#name = 'name' + + def some#varargs(a1: string, ...l: list<string>): string + return a1 .. l[0] .. l[1] + enddef END mkdir('Xdir/autoload', 'p') @@ -3166,6 +3170,8 @@ def Test_vim9_autoload() g:some#other = 'other' assert_equal('other', g:some#other) + assert_equal('abc', some#varargs('a', 'b', 'c')) + # upper case script name works lines =<< trim END vim9script