Mercurial > vim
comparison src/testdir/test_vim9_func.vim @ 26650:a07323eb647f v8.2.3854
patch 8.2.3854: Vim9: inconsistent arguments for test functions
Commit: https://github.com/vim/vim/commit/86b3ab4fa0de3e8884ab6a6ced2a70592b937d0f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 19 18:33:23 2021 +0000
patch 8.2.3854: Vim9: inconsistent arguments for test functions
Problem: Vim9: inconsistent arguments for test functions.
Solution: When :def function and script have different arguments use a list
with two items instead of a separate function.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 Dec 2021 19:45:03 +0100 |
parents | d54a39ec6d43 |
children | 38a270fdd3f6 |
comparison
equal
deleted
inserted
replaced
26649:8a10ad703e92 | 26650:a07323eb647f |
---|---|
489 MyVarargs('one', 'two')->assert_equal('one,two') | 489 MyVarargs('one', 'two')->assert_equal('one,two') |
490 MyVarargs('one', 'two', 'three')->assert_equal('one,two,three') | 490 MyVarargs('one', 'two', 'three')->assert_equal('one,two,three') |
491 enddef | 491 enddef |
492 | 492 |
493 def Test_call_white_space() | 493 def Test_call_white_space() |
494 CheckDefAndScriptFailure2(["call Test ('text')"], 'E476:', 'E1068:') | 494 CheckDefAndScriptFailure(["call Test ('text')"], ['E476:', 'E1068:']) |
495 enddef | 495 enddef |
496 | 496 |
497 def MyDefaultArgs(name = 'string'): string | 497 def MyDefaultArgs(name = 'string'): string |
498 return name | 498 return name |
499 enddef | 499 enddef |