From b5a0719cb7abf51b0540df527cb9738a3ccf0d37 Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Thu, 5 Oct 2023 20:14:43 +0200 Subject: 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 Co-authored-by: Yegappan Lakshmanan --- src/evalvars.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/evalvars.c') diff --git a/src/evalvars.c b/src/evalvars.c index 14b7dc39a4..d7a1a96a54 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -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; -- cgit v1.2.3