summaryrefslogtreecommitdiff
path: root/server/test/hover/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-30 10:44:20 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-30 10:44:20 +0800
commit0f900c018198d20d5c795c099ac28013677ba7c4 (patch)
tree1cbf33d597d0deca90127a40d844eaebb8ef7063 /server/test/hover/init.lua
parent0579771df784cbfbe1dcc824c62e06782a803cef (diff)
downloadlua-language-server-0f900c018198d20d5c795c099ac28013677ba7c4.zip
也会遍历出__index里的内容
Diffstat (limited to 'server/test/hover/init.lua')
-rw-r--r--server/test/hover/init.lua23
1 files changed, 10 insertions, 13 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua
index 05e4458d..89dd2330 100644
--- a/server/test/hover/init.lua
+++ b/server/test/hover/init.lua
@@ -307,19 +307,16 @@ local y: number = 1
]]
TEST[[
-local function get_warnings(warnings)
- local error = nil
- local level = 'on'
- for _, warn in ipairs(warnings) do
- if warn == 'error' then
- <?error?> = true
- else
- level = warn
- end
- end
- return {error = error, level = level}
-end
+local mt = {}
+mt.a = 1
+mt.b = 2
+mt.c = 3
+local <?obj?> = setmetatable({}, {__index = mt})
]]
[[
-local error: boolean = true
+local obj: {
+ a: number = 1,
+ b: number = 2,
+ c: number = 3,
+}
]]