comparison src/evalfunc.c @ 23527:27ca5534a408 v8.2.2306

patch 8.2.2306: Vim9: when using function reference type is not checked Commit: https://github.com/vim/vim/commit/32b3f820107139d7edf0c592bb06f090c3eb6c51 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 6 21:59:39 2021 +0100 patch 8.2.2306: Vim9: when using function reference type is not checked Problem: Vim9: when using function reference type is not checked. Solution: When using a function reference lookup the type and check the argument types. (issue #7629)
author Bram Moolenaar <Bram@vim.org>
date Wed, 06 Jan 2021 22:00:06 +0100
parents f8382c4e6551
children 98185d3dd369
comparison
equal deleted inserted replaced
23526:22fd43db29c8 23527:27ca5534a408
3495 3495
3496 if ((use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL) || is_funcref) 3496 if ((use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL) || is_funcref)
3497 { 3497 {
3498 name = s; 3498 name = s;
3499 trans_name = trans_function_name(&name, &is_global, FALSE, 3499 trans_name = trans_function_name(&name, &is_global, FALSE,
3500 TFN_INT | TFN_QUIET | TFN_NO_AUTOLOAD | TFN_NO_DEREF, NULL, NULL); 3500 TFN_INT | TFN_QUIET | TFN_NO_AUTOLOAD | TFN_NO_DEREF,
3501 NULL, NULL, NULL);
3501 if (*name != NUL) 3502 if (*name != NUL)
3502 s = NULL; 3503 s = NULL;
3503 } 3504 }
3504 3505
3505 if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s)) 3506 if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s))