summaryrefslogtreecommitdiff
path: root/server/test/hover
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-24 14:08:22 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-24 14:08:22 +0800
commit3f9ca58f22eeccd30ff1093c9874bfa79d40a29f (patch)
treeb586b48634be67e11da684deff9dfac33d3e5d68 /server/test/hover
parenta723536198162aef5297fa7dc05d20597895bda8 (diff)
downloadlua-language-server-3f9ca58f22eeccd30ff1093c9874bfa79d40a29f.zip
换个require的做法
Diffstat (limited to 'server/test/hover')
-rw-r--r--server/test/hover/init.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua
index 5d0cb068..445e72ba 100644
--- a/server/test/hover/init.lua
+++ b/server/test/hover/init.lua
@@ -198,3 +198,21 @@ end
function x()
-> any
]]
+
+TEST [[
+local mt = {}
+mt.__index = mt
+
+function mt:add(a, b)
+end
+
+local function init()
+ return setmetatable({}, mt)
+end
+
+local t = init()
+t:<?add?>()
+]]
+[[
+function mt:add(a: any, b: any)
+]]