0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 7.4.2134

Problem:    No error for using function() badly.
Solution:   Check for passing wrong function name. (Ken Takata)
This commit is contained in:
Bram Moolenaar
2016-07-31 14:11:58 +02:00
parent fc1f2015e8
commit b54c3ff317
7 changed files with 25 additions and 10 deletions

View File

@@ -7813,7 +7813,7 @@ var_check_func_name(
/* Don't allow hiding a function. When "v" is not NULL we might be
* assigning another function to the same var, the type is checked
* below. */
if (new_var && function_exists(name))
if (new_var && function_exists(name, FALSE))
{
EMSG2(_("E705: Variable name conflicts with existing function: %s"),
name);