summaryrefslogtreecommitdiff
path: root/server-beta/test
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta/test')
-rw-r--r--server-beta/test/hover/init.lua50
1 files changed, 50 insertions, 0 deletions
diff --git a/server-beta/test/hover/init.lua b/server-beta/test/hover/init.lua
index 33999342..7637120e 100644
--- a/server-beta/test/hover/init.lua
+++ b/server-beta/test/hover/init.lua
@@ -37,6 +37,56 @@ local mt = {}
mt.__index = mt
function mt:init(a, b, c)
+ return
+end
+
+local obj = setmetatable({}, mt)
+
+obj:<?init?>(1, '测试')
+]]
+[[
+function mt:init(a: any, b: any, c: any)
+]]
+
+TEST [[
+local mt = {}
+mt.__index = mt
+mt.type = 'Class'
+
+function mt:init(a, b, c)
+ return
+end
+
+local obj = setmetatable({}, mt)
+
+obj:<?init?>(1, '测试')
+]]
+[[
+function Class:init(a: any, b: any, c: any)
+]]
+
+TEST [[
+local mt = {}
+mt.__index = mt
+mt.__name = 'Class'
+
+function mt:init(a, b, c)
+ return
+end
+
+local obj = setmetatable({}, mt)
+
+obj:<?init?>(1, '测试')
+]]
+[[
+function Class:init(a: any, b: any, c: any)
+]]
+
+TEST [[
+local mt = {}
+mt.__index = mt
+
+function mt:init(a, b, c)
return {}
end