patch 9.0.0056: wrong line number reported when :cexpr fails in :def function
Problem: Wrong line number reported when :cexpr fails in :def function.
Solution: Set line_number before executing :cexpr. (closes #10735)
diff --git a/src/vim9execute.c b/src/vim9execute.c
index 9dd5937..2f94f05 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -2786,6 +2786,7 @@
ea.cmdlinep = &iptr->isn_arg.cexpr.cexpr_ref->cer_cmdline;
--ectx->ec_stack.ga_len;
tv = STACK_TV_BOT(0);
+ SOURCING_LNUM = iptr->isn_lnum;
res = cexpr_core(&ea, tv);
clear_tv(tv);
if (res == FAIL)