summaryrefslogtreecommitdiff
path: root/script-beta/core/hover/table.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-09-19 10:23:51 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-09-19 10:23:51 +0800
commit6254519cc988d0f5a1f507979de8f2ab09a0537f (patch)
tree88cdc6adaa4d3fbfee38bf502a7c1b7757bddb08 /script-beta/core/hover/table.lua
parent58e4cfe8c2498e676cf60b127f317033242bcd3a (diff)
downloadlua-language-server-6254519cc988d0f5a1f507979de8f2ab09a0537f.zip
修正bug
Diffstat (limited to 'script-beta/core/hover/table.lua')
-rw-r--r--script-beta/core/hover/table.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script-beta/core/hover/table.lua b/script-beta/core/hover/table.lua
index 0e0fe70f..0d243aff 100644
--- a/script-beta/core/hover/table.lua
+++ b/script-beta/core/hover/table.lua
@@ -38,7 +38,9 @@ local function getField(src)
if src.parent.type == 'tableindex'
or src.parent.type == 'setindex'
or src.parent.type == 'getindex' then
- src = src.parent
+ if src.parent.index == src then
+ src = src.parent
+ end
end
local tp = vm.getInferType(src)
local class = vm.getClass(src)