summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-01 22:11:01 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-01 22:11:01 +0200
commite69f6d044c420d41dced9ba96a3b90f25788e39a (patch)
tree93ea671c8ff74e5ba89808a4561f36cdfc5f4b5c /src/evalfunc.c
parenta8c1770469504ae66c80bbdb03b6b31641215848 (diff)
patch 8.2.0493: Vim9: some error messages not testedv8.2.0493
Problem: Vim9: some error messages not tested. Solution: Add more tests. Fix uncovered bugs.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 5f290aa69e..6832bf1714 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -290,7 +290,8 @@ ret_string(int argcount UNUSED, type_T **argtypes UNUSED)
{
return &t_string;
}
- static type_T * ret_list_any(int argcount UNUSED, type_T **argtypes UNUSED)
+ static type_T *
+ret_list_any(int argcount UNUSED, type_T **argtypes UNUSED)
{
return &t_list_any;
}
@@ -330,9 +331,14 @@ ret_blob(int argcount UNUSED, type_T **argtypes UNUSED)
return &t_blob;
}
static type_T *
-ret_partial_void(int argcount UNUSED, type_T **argtypes UNUSED)
+ret_func_any(int argcount UNUSED, type_T **argtypes UNUSED)
{
- return &t_partial_void;
+ return &t_func_any;
+}
+ static type_T *
+ret_partial_any(int argcount UNUSED, type_T **argtypes UNUSED)
+{
+ return &t_partial_any;
}
static type_T *
ret_channel(int argcount UNUSED, type_T **argtypes UNUSED)
@@ -558,7 +564,7 @@ static funcentry_T global_functions[] =
{"foldtext", 0, 0, 0, ret_string, f_foldtext},
{"foldtextresult", 1, 1, FEARG_1, ret_string, f_foldtextresult},
{"foreground", 0, 0, 0, ret_void, f_foreground},
- {"funcref", 1, 3, FEARG_1, ret_partial_void, f_funcref},
+ {"funcref", 1, 3, FEARG_1, ret_partial_any, f_funcref},
{"function", 1, 3, FEARG_1, ret_f_function, f_function},
{"garbagecollect", 0, 1, 0, ret_void, f_garbagecollect},
{"get", 2, 3, FEARG_1, ret_any, f_get},
@@ -952,9 +958,10 @@ static funcentry_T global_functions[] =
{"test_null_blob", 0, 0, 0, ret_blob, f_test_null_blob},
{"test_null_channel", 0, 0, 0, ret_channel, JOB_FUNC(f_test_null_channel)},
{"test_null_dict", 0, 0, 0, ret_dict_any, f_test_null_dict},
+ {"test_null_function", 0, 0, 0, ret_func_any, f_test_null_function},
{"test_null_job", 0, 0, 0, ret_job, JOB_FUNC(f_test_null_job)},
{"test_null_list", 0, 0, 0, ret_list_any, f_test_null_list},
- {"test_null_partial", 0, 0, 0, ret_partial_void, f_test_null_partial},
+ {"test_null_partial", 0, 0, 0, ret_partial_any, f_test_null_partial},
{"test_null_string", 0, 0, 0, ret_string, f_test_null_string},
{"test_option_not_set", 1, 1, FEARG_1,ret_void, f_test_option_not_set},
{"test_override", 2, 2, FEARG_2, ret_void, f_test_override},