summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script-beta/parser/guide.lua2
-rw-r--r--test-beta/definition/luadoc.lua10
-rw-r--r--test-beta/hover/init.lua11
3 files changed, 12 insertions, 11 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua
index 0760c441..48eec0f0 100644
--- a/script-beta/parser/guide.lua
+++ b/script-beta/parser/guide.lua
@@ -1456,6 +1456,8 @@ function m.checkSameSimpleByBindDocs(status, obj, start, queue, mode)
end
end
end
+ elseif doc.type == 'doc.overload' then
+ results[#results+1] = doc.overload
end
end
local mark = {}
diff --git a/test-beta/definition/luadoc.lua b/test-beta/definition/luadoc.lua
index d91c3dfe..a0881334 100644
--- a/test-beta/definition/luadoc.lua
+++ b/test-beta/definition/luadoc.lua
@@ -91,6 +91,16 @@ TEST [[
function t(<?<!f!>?>) end
]]
+TEST [[
+---@overload <!fun(y: boolean)!>
+---@param x number
+---@param y boolean
+---@param z string
+function <!f!>(x, y, z) end
+
+print(<?f?>)
+]]
+
-- TODO
do return end
TEST [[
diff --git a/test-beta/hover/init.lua b/test-beta/hover/init.lua
index 471ad2ce..6efbef55 100644
--- a/test-beta/hover/init.lua
+++ b/test-beta/hover/init.lua
@@ -1198,17 +1198,6 @@ local <?x?> = f()
local x: integer
]]
-TEST [[
----@overload fun(y: boolean)
----@param x number
----@param y boolean
----@param z string
-function <?f?>(x, y, z) end
-]]
-[=[
-function f(x: number, y: boolean, z: string)
-]=]
-
do return end
TEST [[
---@param x number {optional = 'after'}