comparison src/eval.c @ 9717:6226de5f8137 v7.4.2134

commit https://github.com/vim/vim/commit/b54c3ff3174dbb5dfbfcabdf95200b047beaa644 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 31 14:11:58 2016 +0200 patch 7.4.2134 Problem: No error for using function() badly. Solution: Check for passing wrong function name. (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Sun, 31 Jul 2016 14:15:05 +0200
parents 2ea935bdd1a1
children 80ac9cf77c9b
comparison
equal deleted inserted replaced
9716:f294f224b8fc 9717:6226de5f8137
7811 return TRUE; 7811 return TRUE;
7812 } 7812 }
7813 /* Don't allow hiding a function. When "v" is not NULL we might be 7813 /* Don't allow hiding a function. When "v" is not NULL we might be
7814 * assigning another function to the same var, the type is checked 7814 * assigning another function to the same var, the type is checked
7815 * below. */ 7815 * below. */
7816 if (new_var && function_exists(name)) 7816 if (new_var && function_exists(name, FALSE))
7817 { 7817 {
7818 EMSG2(_("E705: Variable name conflicts with existing function: %s"), 7818 EMSG2(_("E705: Variable name conflicts with existing function: %s"),
7819 name); 7819 name);
7820 return TRUE; 7820 return TRUE;
7821 } 7821 }