patch 8.2.4946: Vim9: some code not covered by tests
Problem: Vim9: some code not covered by tests.
Solution: Add a few more test cases. Remove dead code.
diff --git a/src/vim9expr.c b/src/vim9expr.c
index a200a87..6fb6fc4 100644
--- a/src/vim9expr.c
+++ b/src/vim9expr.c
@@ -1122,7 +1122,7 @@
r = get_lambda_tv(arg, rettv, types_optional, evalarg);
current_sctx.sc_version = save_sc_version;
if (r != OK)
- return r;
+ return r; // currently unreachable
// "rettv" will now be a partial referencing the function.
ufunc = rettv->vval.v_partial->pt_func;
@@ -1682,12 +1682,6 @@
-1, 0, cctx, FALSE, FALSE) == FAIL)
return FAIL;
- while (p > start && (p[-1] == '-' || p[-1] == '+'))
- {
- --p;
- if (*p == '-')
- negate = !negate;
- }
// only '-' has an effect, for '+' we only check the type
if (negate)
{