0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2290: Vim9: unlet of global variable cannot be compiled

Problem:    Vim9: unlet of global variable cannot be compiled.
Solution:   Skip over variables that might be defined later. Give an error if
            a subscript is found. (closes #7585)
This commit is contained in:
Bram Moolenaar
2021-01-03 20:55:26 +01:00
parent e5a2dc87fd
commit 2ef951dd31
5 changed files with 26 additions and 3 deletions

View File

@@ -813,9 +813,9 @@ get_lval(
// Clear everything in "lp".
CLEAR_POINTER(lp);
if (skip)
if (skip || (flags & GLV_COMPILING))
{
// When skipping just find the end of the name.
// When skipping or compiling just find the end of the name.
lp->ll_name = name;
lp->ll_name_end = find_name_end(name, NULL, NULL,
FNE_INCL_BR | fne_flags);