patch 9.1.0299: Vim9: return type not set for a lambda assigned to script var
Problem: Vim9: return type not set for a lambda assigned to script var
(Ernie Rael)
Solution: Correctly determine the return type (Yegappan Lakshmanan)
fixes: #14445
closes: #14473
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/vim9.vim b/src/testdir/vim9.vim
index 782809b..764b611 100644
--- a/src/testdir/vim9.vim
+++ b/src/testdir/vim9.vim
@@ -112,11 +112,13 @@
# :source a list of "lines" and check whether it fails with "error"
export def CheckSourceFailure(lines: list<string>, error: string, lnum = -3)
+ var cwd = getcwd()
new
setline(1, lines)
try
assert_fails('source', error, lines, lnum)
finally
+ chdir(cwd)
bw!
endtry
enddef
@@ -124,22 +126,26 @@
# :source a list of "lines" and check whether it fails with the list of
# "errors"
export def CheckSourceFailureList(lines: list<string>, errors: list<string>, lnum = -3)
+ var cwd = getcwd()
new
setline(1, lines)
try
assert_fails('source', errors, lines, lnum)
finally
+ chdir(cwd)
bw!
endtry
enddef
# :source a list of "lines" and check whether it succeeds
export def CheckSourceSuccess(lines: list<string>)
+ var cwd = getcwd()
new
setline(1, lines)
try
:source
finally
+ chdir(cwd)
bw!
endtry
enddef