summaryrefslogtreecommitdiff
path: root/script-beta
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-05 11:24:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-05 11:24:21 +0800
commitcc7eb35294d2dd936bd133cafbca972f33db00f5 (patch)
tree3921a94035996b52bc5d49f3d776795a3e9de30f /script-beta
parentabc9c7fa257ec7d26d491f1d5ef32cfb70bf4e49 (diff)
downloadlua-language-server-cc7eb35294d2dd936bd133cafbca972f33db00f5.zip
修正一个类型推断bug
Diffstat (limited to 'script-beta')
-rw-r--r--script-beta/parser/guide.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua
index 8893c81d..f52e9545 100644
--- a/script-beta/parser/guide.lua
+++ b/script-beta/parser/guide.lua
@@ -3218,6 +3218,10 @@ function m.inferByGetTable(status, source)
if #status.results ~= 0 then
return
end
+ if source.type == 'field'
+ or source.type == 'method' then
+ source = source.parent
+ end
local next = source.next
if not next then
return