diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2024-04-10 17:18:19 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-04-10 17:18:19 +0200 |
commit | 7f5202143b2c84ec12e709272d90dd79621d14ca (patch) | |
tree | 2aeb0df82a0773db12da800e684dc1a79a440d49 /src/testdir/vim9.vim | |
parent | b988c7a95f5ddb1f665a3fc7f0bcf2b08145693b (diff) |
patch 9.1.0299: Vim9: return type not set for a lambda assigned to script varv9.1.0299
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>
Diffstat (limited to 'src/testdir/vim9.vim')
-rw-r--r-- | src/testdir/vim9.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testdir/vim9.vim b/src/testdir/vim9.vim index 782809bde8..764b6119db 100644 --- a/src/testdir/vim9.vim +++ b/src/testdir/vim9.vim @@ -112,11 +112,13 @@ enddef # :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 @@ enddef # :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 |