diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-30 10:44:20 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-30 10:44:20 +0800 |
commit | 0f900c018198d20d5c795c099ac28013677ba7c4 (patch) | |
tree | 1cbf33d597d0deca90127a40d844eaebb8ef7063 /server/test/hover/init.lua | |
parent | 0579771df784cbfbe1dcc824c62e06782a803cef (diff) | |
download | lua-language-server-0f900c018198d20d5c795c099ac28013677ba7c4.zip |
也会遍历出__index里的内容
Diffstat (limited to 'server/test/hover/init.lua')
-rw-r--r-- | server/test/hover/init.lua | 23 |
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, +} ]] |