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)
diff --git a/src/vim.h b/src/vim.h
index a0ee0d6..7ba728a 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -2544,12 +2544,14 @@
#define TFN_NO_DEREF 0x08 // do not dereference a Funcref
#define TFN_READ_ONLY 0x10 // will not change the var
#define TFN_NO_DECL 0x20 // only used for GLV_NO_DECL
+#define TFN_COMPILING 0x40 // only used for GLV_COMPILING
// Values for get_lval() flags argument:
#define GLV_QUIET TFN_QUIET // no error messages
#define GLV_NO_AUTOLOAD TFN_NO_AUTOLOAD // do not use script autoloading
#define GLV_READ_ONLY TFN_READ_ONLY // will not change the var
#define GLV_NO_DECL TFN_NO_DECL // assignment without :var or :let
+#define GLV_COMPILING TFN_COMPILING // variable may be defined later
#define DO_NOT_FREE_CNT 99999 // refcount for dict or list that should not
// be freed.