summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/src/core/hover/emmy_function.lua3
-rw-r--r--server/test/hover/init.lua11
2 files changed, 14 insertions, 0 deletions
diff --git a/server/src/core/hover/emmy_function.lua b/server/src/core/hover/emmy_function.lua
index 4dd89107..8c36ea2c 100644
--- a/server/src/core/hover/emmy_function.lua
+++ b/server/src/core/hover/emmy_function.lua
@@ -10,6 +10,9 @@ local function buildEmmyArgs(emmy, object, select)
local i = 0
emmy:eachParam(function (name, typeObj)
i = i + 1
+ if i < start then
+ return
+ end
if i > start then
strs[#strs+1] = ', '
end
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua
index a3d56cdf..88bc13d5 100644
--- a/server/test/hover/init.lua
+++ b/server/test/hover/init.lua
@@ -779,6 +779,17 @@ function ()
]]
TEST [[
+---@type fun(a:any, b:any)
+local f
+local t = {f = f}
+t:<?f?>()
+]]
+[[
+function f(b: any)
+ -> any
+]]
+
+TEST [[
---@param names string[]
local function f(<?names?>)
end