1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2021-12-19 18:33:23 +00:00
parent 700e6b1662
commit 86b3ab4fa0
13 changed files with 1007 additions and 995 deletions

View File

@@ -246,7 +246,7 @@ func Test_str2float()
call assert_equal('123456.7', string(str2float("123'456.7'89", 1)))
call assert_equal(1.2, str2float(1.2, 0))
call CheckDefAndScriptFailure2(['str2float(1.2)'], 'E1013: Argument 1: type mismatch, expected string but got float', 'E1174: String required for argument 1')
call CheckDefAndScriptFailure(['str2float(1.2)'], ['E1013: Argument 1: type mismatch, expected string but got float', 'E1174: String required for argument 1'])
call assert_fails("call str2float([])", 'E730:')
call assert_fails("call str2float({})", 'E731:')
call assert_fails("call str2float(function('string'))", 'E729:')