summaryrefslogtreecommitdiff
path: root/script/core/diagnostics.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-07-13 15:52:59 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-07-13 15:52:59 +0800
commiteeacdf95e177f9334f86b22491bcd43604f07b6c (patch)
tree7753d89a3024dc04af80aa2f04f0f0577c518481 /script/core/diagnostics.lua
parent13dca2e42ffd67b832e24206ee0157fb9073eb11 (diff)
downloadlua-language-server-eeacdf95e177f9334f86b22491bcd43604f07b6c.zip
修正诊断“重复的tablefield”对index的检测错误
Diffstat (limited to 'script/core/diagnostics.lua')
-rw-r--r--script/core/diagnostics.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/script/core/diagnostics.lua b/script/core/diagnostics.lua
index 82a7f6ad..0a9d339d 100644
--- a/script/core/diagnostics.lua
+++ b/script/core/diagnostics.lua
@@ -420,9 +420,9 @@ function mt:searchDuplicateIndex(callback)
if obj.type == 'pair' then
local key = obj[1]
local name
- if key.index then
- if key.type == 'string' then
- name = key[1]
+ if key.type == 'index' then
+ if key[1].type == 'string' then
+ name = key[1][1]
end
elseif key.type == 'name' then
name = key[1]