1
0
forked from aniani/vim

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>
This commit is contained in:
Yegappan Lakshmanan
2023-10-05 20:14:43 +02:00
committed by Christian Brabandt
parent b6d01f131c
commit b5a0719cb7
6 changed files with 55 additions and 1 deletions

View File

@@ -1858,6 +1858,7 @@ ex_let_one(
char_u *p;
int lval_flags = (flags & (ASSIGN_NO_DECL | ASSIGN_DECL))
? GLV_NO_DECL : 0;
lval_flags |= (flags & ASSIGN_FOR_LOOP) ? GLV_FOR_LOOP : 0;
if (op != NULL && *op != '=')
lval_flags |= GLV_ASSIGN_WITH_OP;