patch 9.0.1986: Vim9: accepting type-annotations
Problem: Vim9: accepting type-annotations
Solution: Reject type annotations outside of declarations.
closes: #13267
closes: #13283
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
diff --git a/src/vim.h b/src/vim.h
index 0a0b2f8..2bafda4 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -2776,6 +2776,7 @@
#define GLV_COMPILING TFN_COMPILING // variable may be defined later
#define GLV_ASSIGN_WITH_OP TFN_ASSIGN_WITH_OP // assignment with operator
#define GLV_PREFER_FUNC 0x10000 // prefer function above variable
+#define GLV_FOR_LOOP 0x20000 // assigning to a loop variable
#define DO_NOT_FREE_CNT 99999 // refcount for dict or list that should not
// be freed.