File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,40 @@ local function f(...) end
138138local <?r?> = f(10)
139139]]
140140
141+ TEST ' 1' [[
142+ ---@overload fun(a: string): 1
143+ ---@overload fun(a: 'y'): 2
144+ local function f(...) end
145+
146+ local <?r?> = f('x')
147+ ]]
148+
149+ TEST ' 2' [[
150+ ---@overload fun(a: string): 1
151+ ---@overload fun(a: 'y'): 2
152+ local function f(...) end
153+
154+ local <?r?> = f('y')
155+ ]]
156+
157+ TEST ' 1' [[
158+ ---@overload fun(a: string): 1
159+ ---@overload fun(a: 'y'): 2
160+ local function f(...) end
161+
162+ local v = 'x'
163+ local <?r?> = f(v)
164+ ]]
165+
166+ TEST ' 2' [[
167+ ---@overload fun(a: string): 1
168+ ---@overload fun(a: 'y'): 2
169+ local function f(...) end
170+
171+ local v = 'y'
172+ local <?r?> = f(v)
173+ ]]
174+
141175TEST ' number' [[
142176---@overload fun(a: 1, c: fun(x: number))
143177---@overload fun(a: 2, c: fun(x: string))
You can’t perform that action at this time.
0 commit comments