}
enddef
+def LambdaUsingArg(x: number): func
+ return {->
+ # some comment
+ x == 1
+ # some comment
+ ||
+ x == 2
+ }
+enddef
+
def Test_expr7_lambda()
let La = { -> 'result'}
assert_equal('result', La())
assert_equal(true, LambdaWithComments()(2))
assert_equal(false, LambdaWithComments()(3))
+ assert_equal(false, LambdaUsingArg(0)())
+ assert_equal(true, LambdaUsingArg(1)())
+
call CheckDefFailure(["filter([1, 2], {k,v -> 1})"], 'E1069:')
enddef
if (gen_load)
res = generate_LOAD(cctx, ISN_LOAD, idx, NULL, type);
if (gen_load_outer)
+ {
res = generate_LOAD(cctx, ISN_LOADOUTER, idx, NULL, type);
+ cctx->ctx_outer_used = TRUE;
+ }
}
*arg = end;