Mercurial > vim
comparison src/evalfunc.c @ 25126:b825efff9790 v8.2.3100
patch 8.2.3100: Vim9: no error when using type with unknown number of args
Commit: https://github.com/vim/vim/commit/7a40ff00edd35cc4313d74a43e7a7b67cd24372d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 4 15:54:08 2021 +0200
patch 8.2.3100: Vim9: no error when using type with unknown number of args
Problem: Vim9: no error when using type with unknown number of arguments.
Solution: Do not ignore argument count of -1. (closes https://github.com/vim/vim/issues/8492)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 04 Jul 2021 16:00:03 +0200 |
parents | 99494ef94fc2 |
children | c44d6ac81c42 |
comparison
equal
deleted
inserted
replaced
25125:a3ab834c714c | 25126:b825efff9790 |
---|---|
2053 } | 2053 } |
2054 return OK; | 2054 return OK; |
2055 } | 2055 } |
2056 | 2056 |
2057 /* | 2057 /* |
2058 * Get the argument count for function "idx". | |
2059 * "argcount" is the total argument count, "min_argcount" the non-optional | |
2060 * argument count. | |
2061 */ | |
2062 void | |
2063 internal_func_get_argcount(int idx, int *argcount, int *min_argcount) | |
2064 { | |
2065 *argcount = global_functions[idx].f_max_argc; | |
2066 *min_argcount = global_functions[idx].f_min_argc; | |
2067 } | |
2068 | |
2069 /* | |
2058 * Call the "f_retfunc" function to obtain the return type of function "idx". | 2070 * Call the "f_retfunc" function to obtain the return type of function "idx". |
2059 * "argtypes" is the list of argument types or NULL when there are no | 2071 * "argtypes" is the list of argument types or NULL when there are no |
2060 * arguments. | 2072 * arguments. |
2061 */ | 2073 */ |
2062 type_T * | 2074 type_T * |