patch 8.2.3203: Vim9: compiled string expression causes type error
Problem: Vim9: compiled string expression causes type error. (Yegappan
Lakshmanan)
Solution: Remove the string type from the stack.
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 4f7a039..2399434 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -3244,6 +3244,9 @@
int instr_count;
isn_T *instr = NULL;
+ // Remove the string type from the stack.
+ --cctx->ctx_type_stack.ga_len;
+
// Temporarily reset the list of instructions so that the jump labels are
// correct.
cctx->ctx_instr.ga_len = 0;
@@ -4263,8 +4266,8 @@
}
}
- // Do not skip over white space to find the "(", "execute 'x' ()" is
- // not a function call.
+ // Do not skip over white space to find the "(", "execute 'x' (expr)"
+ // is not a function call.
if (**arg == '(')
{
garray_T *stack = &cctx->ctx_type_stack;