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.
diff --git a/src/vim9expr.c b/src/vim9expr.c
index 4028037..b44f928 100644
--- a/src/vim9expr.c
+++ b/src/vim9expr.c
@@ -501,7 +501,7 @@
{
// "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);