summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-22 19:17:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-22 19:17:54 +0800
commit3981f28e23e1e7f4fb4cf44695490f0ce929a870 (patch)
treeb3eb3ada1708b691e5bb4067c44244a564bdf62b /script/core
parentb6dc9568d47ff4c4612c25ff3a09f62c64b46f70 (diff)
downloadlua-language-server-3981f28e23e1e7f4fb4cf44695490f0ce929a870.zip
fix wrong type infer of doc.field
Diffstat (limited to 'script/core')
-rw-r--r--script/core/hover/label.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/script/core/hover/label.lua b/script/core/hover/label.lua
index dd309c41..2fb0b14c 100644
--- a/script/core/hover/label.lua
+++ b/script/core/hover/label.lua
@@ -127,10 +127,8 @@ local function asDocField(source)
end
end
local infers = {}
- for _, ext in ipairs(source.extends) do
- for _, infer in ipairs(vm.getInfers(ext) or {}) do
- infers[#infers+1] = infer
- end
+ for _, infer in ipairs(vm.getInfers(source.extends) or {}) do
+ infers[#infers+1] = infer
end
if not class then
return ('field ?.%s: %s'):format(