summaryrefslogtreecommitdiff
path: root/test/hover/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/hover/init.lua')
-rw-r--r--test/hover/init.lua40
1 files changed, 37 insertions, 3 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua
index a97cf3ae..9cdf2ed4 100644
--- a/test/hover/init.lua
+++ b/test/hover/init.lua
@@ -247,7 +247,7 @@ TEST [[
<?print?>()
]]
[[
-function print(...: any)
+function print(...any)
]]
TEST [[
@@ -300,7 +300,7 @@ end
<?x?>(1, 2, 3, 4, 5, 6, 7)
]]
[[
-function x(a: any, ...: any)
+function x(a: any, ...any)
]]
TEST [[
@@ -1518,7 +1518,7 @@ TEST [[
local function f(<?callback?>) end
]]
[[
-(parameter) callback: fun(x: integer, ...: any)
+(parameter) callback: fun(x: integer, ...any)
]]
TEST [[
@@ -2030,3 +2030,37 @@ local t: A {
y: boolean = true,
}
]]
+
+TEST [[
+---@param ... boolean
+---@return number ...
+local function <?f?>(...) end
+]]
+[[
+function f(...boolean)
+ -> ...number
+]]
+
+TEST [[
+---@type fun():x: number
+local <?f?>
+]]
+[[
+local f: fun():(x: number)
+]]
+
+TEST [[
+---@type fun(...: boolean):...: number
+local <?f?>
+]]
+[[
+local f: fun(...boolean):...number
+]]
+
+TEST [[
+---@type fun():x: number, y: boolean
+local <?f?>
+]]
+[[
+local f: fun():(x: number, y: boolean)
+]]