1
0
forked from aniani/vim

patch 8.2.4332: Vim9: incomplete test for existing script variable in block

Problem:    Vim9: incomplete test for existing script variable in block.
Solution:   Add a couple more tests.  Fix uncovered problem.
This commit is contained in:
Bram Moolenaar
2022-02-08 20:35:30 +00:00
parent 3a5988c025
commit dce2441a60
7 changed files with 86 additions and 24 deletions

View File

@@ -501,7 +501,7 @@ compile_load(
{
// "var" can be script-local even without using "s:" if it
// already exists in a Vim9 script or when it's imported.
if (script_var_exists(*arg, len, cctx) == OK
if (script_var_exists(*arg, len, cctx, NULL) == OK
|| find_imported(name, 0, FALSE, cctx) != NULL)
res = compile_load_scriptvar(cctx, name, *arg, &end, FALSE);