patch 8.2.2107: Vim9: some errors not tested
Problem: Vim9: some errors not tested.
Solution: Add tests. Fix getting the right error.
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 9f2aaba..310e9e2 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -2229,6 +2229,7 @@
{
if (may_get_next_line(whitep, arg, cctx) == FAIL)
{
+ SOURCING_LNUM = cctx->ctx_lnum + 1;
emsg(_(e_line_incomplete));
return FAIL;
}
@@ -5300,7 +5301,7 @@
wp = op + oplen;
p = skipwhite(wp);
- if (may_get_next_line(wp, &p, cctx) == FAIL)
+ if (may_get_next_line_error(wp, &p, cctx) == FAIL)
return FAIL;
if (compile_expr0(&p, cctx) == FAIL)
return NULL;