CheckScriptFailure(['vim9script'] + lines, 'E118: Too many arguments for function: <lambda>', 2)
enddef
+def Test_lambda_line_nr()
+ var lines =<< trim END
+ vim9script
+ # comment
+ # comment
+ var id = timer_start(1'000, (_) => 0)
+ var out = execute('verbose ' .. timer_info(id)[0].callback
+ ->string()
+ ->substitute("('\\|')", ' ', 'g'))
+ assert_match('Last set from .* line 4', out)
+ END
+ CheckScriptSuccess(lines)
+enddef
+
def FilterWithCond(x: string, Cond: func(string): bool): bool
return Cond(x)
enddef
fp->uf_flags = flags;
fp->uf_calls = 0;
fp->uf_script_ctx = current_sctx;
- fp->uf_script_ctx.sc_lnum += SOURCING_LNUM - newlines.ga_len;
+ fp->uf_script_ctx.sc_lnum += SOURCING_LNUM - newlines.ga_len + 1;
function_using_block_scopes(fp, evalarg->eval_cstack);