comparison src/testdir/vim9.vim @ 34864:3f9d9ee5cb7c v9.1.0299

patch 9.1.0299: Vim9: return type not set for a lambda assigned to script var Commit: https://github.com/vim/vim/commit/7f5202143b2c84ec12e709272d90dd79621d14ca Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Wed Apr 10 17:18:19 2024 +0200 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>
author Christian Brabandt <cb@256bit.org>
date Wed, 10 Apr 2024 17:30:04 +0200
parents aba1fa2b7d1e
children 96131d0faead
comparison
equal deleted inserted replaced
34863:6e66a52748d0 34864:3f9d9ee5cb7c
110 endtry 110 endtry
111 enddef 111 enddef
112 112
113 # :source a list of "lines" and check whether it fails with "error" 113 # :source a list of "lines" and check whether it fails with "error"
114 export def CheckSourceFailure(lines: list<string>, error: string, lnum = -3) 114 export def CheckSourceFailure(lines: list<string>, error: string, lnum = -3)
115 var cwd = getcwd()
115 new 116 new
116 setline(1, lines) 117 setline(1, lines)
117 try 118 try
118 assert_fails('source', error, lines, lnum) 119 assert_fails('source', error, lines, lnum)
119 finally 120 finally
121 chdir(cwd)
120 bw! 122 bw!
121 endtry 123 endtry
122 enddef 124 enddef
123 125
124 # :source a list of "lines" and check whether it fails with the list of 126 # :source a list of "lines" and check whether it fails with the list of
125 # "errors" 127 # "errors"
126 export def CheckSourceFailureList(lines: list<string>, errors: list<string>, lnum = -3) 128 export def CheckSourceFailureList(lines: list<string>, errors: list<string>, lnum = -3)
129 var cwd = getcwd()
127 new 130 new
128 setline(1, lines) 131 setline(1, lines)
129 try 132 try
130 assert_fails('source', errors, lines, lnum) 133 assert_fails('source', errors, lines, lnum)
131 finally 134 finally
135 chdir(cwd)
132 bw! 136 bw!
133 endtry 137 endtry
134 enddef 138 enddef
135 139
136 # :source a list of "lines" and check whether it succeeds 140 # :source a list of "lines" and check whether it succeeds
137 export def CheckSourceSuccess(lines: list<string>) 141 export def CheckSourceSuccess(lines: list<string>)
142 var cwd = getcwd()
138 new 143 new
139 setline(1, lines) 144 setline(1, lines)
140 try 145 try
141 :source 146 :source
142 finally 147 finally
148 chdir(cwd)
143 bw! 149 bw!
144 endtry 150 endtry
145 enddef 151 enddef
146 152
147 export def CheckDefAndScriptSuccess(lines: list<string>) 153 export def CheckDefAndScriptSuccess(lines: list<string>)