1
0
forked from aniani/vim

patch 9.0.0219: cannot make a funcref with "s:func" in a def function

Problem:    Cannot make a funcref with "s:func" in a def function in legacy
            script.
Solution:   Allow for using a lower case function name after "s:". (Kota Kato,
            closes #10926)
This commit is contained in:
Kota Kato
2022-08-16 16:09:59 +01:00
committed by Bram Moolenaar
parent e98c88c44c
commit 948a3894d9
4 changed files with 45 additions and 4 deletions

View File

@@ -3995,7 +3995,8 @@ trans_function_name(
{
if (!vim9_local)
{
if (vim9script && lead == 2 && !ASCII_ISUPPER(*lv.ll_name))
if (vim9script && lead == 2 && !ASCII_ISUPPER(*lv.ll_name)
&& current_script_is_vim9())
{
semsg(_(e_function_name_must_start_with_capital_str), start);
goto theend;