mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.4264: Vim9: can use old style autoload function name
Problem: Vim9: can use old style autoload function name. Solution: Give an error for old style autoload function name.
This commit is contained in:
@@ -4232,6 +4232,11 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free)
|
||||
name = prefixed;
|
||||
}
|
||||
}
|
||||
else if (vim9script && vim_strchr(name, AUTOLOAD_CHAR) != NULL)
|
||||
{
|
||||
emsg(_(e_cannot_use_name_with_hash_in_vim9_script_use_export_instead));
|
||||
goto ret_free;
|
||||
}
|
||||
}
|
||||
|
||||
// An error in a function call during evaluation of an expression in magic
|
||||
@@ -4540,12 +4545,6 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (vim9script && vim_strchr(name, AUTOLOAD_CHAR) != NULL)
|
||||
{
|
||||
semsg(_(e_using_autoload_name_in_non_autoload_script_str),
|
||||
name);
|
||||
goto erret;
|
||||
}
|
||||
}
|
||||
if (var_conflict)
|
||||
{
|
||||
|
Reference in New Issue
Block a user