summaryrefslogtreecommitdiff
path: root/server/test/hover
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-17 13:50:38 +0800
committersumneko <sumneko@hotmail.com>2019-04-17 13:50:38 +0800
commitdfce55a48eb5f7f69bd64eba2b523b4e15e7e342 (patch)
tree21104eb9f101cdfc73657b2306bf6b2ddbf3fe0e /server/test/hover
parent23ce4d049c7076edcd700fbac01554069c5de554 (diff)
downloadlua-language-server-dfce55a48eb5f7f69bd64eba2b523b4e15e7e342.zip
特殊处理pairs,使其返回真正的next
Diffstat (limited to 'server/test/hover')
-rw-r--r--server/test/hover/init.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua
index 78ce0546..d71d2407 100644
--- a/server/test/hover/init.lua
+++ b/server/test/hover/init.lua
@@ -448,3 +448,19 @@ local <?n?> = rawlen()
[[
local n: integer
]]
+
+TEST[[
+<?next?>()
+]]
+[[
+function next(table: table [, index: any])
+ -> key: any, value: any
+]]
+
+TEST[[
+local <?n?> = pairs()
+]]
+[[
+function n<next>(table: table [, index: any])
+ -> key: any, value: any
+]]