patch 9.0.0799: in compiled function ->() on next line not recognized
Problem: In compiled function ->() on next line not recognized.
Solution: Also check for "(". (closes #11405)
diff --git a/src/testdir/test_lambda.vim b/src/testdir/test_lambda.vim
index 3e348a0..250ce5c 100644
--- a/src/testdir/test_lambda.vim
+++ b/src/testdir/test_lambda.vim
@@ -82,6 +82,23 @@
call v9.CheckDefAndScriptSuccess(lines)
endfunc
+def Test_lamba_compiled_linebreak()
+ var lines =<< trim END
+ vim9script
+
+ def Echo(what: any)
+ assert_equal('hello world', what)
+ enddef
+ def That()
+ printf("hello ")
+ ->((x) => x .. "world")()
+ ->Echo()
+ enddef
+ That()
+ END
+ v9.CheckScriptSuccess(lines)
+enddef
+
func Test_lambda_with_partial()
let l:Cb = function({... -> ['zero', a:1, a:2, a:3]}, ['one', 'two'])
call assert_equal(['zero', 'one', 'two', 'three'], l:Cb('three'))