summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-30 15:24:46 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-30 15:24:46 +0800
commit735e2e180ee45dc4bb6e2ac86e5dbdac591e5974 (patch)
tree8cae92538e8c6ce03b864bcb685a9a0359fac2cc /script
parent207f5f7211b5349e203bb30a1209409f52ea5091 (diff)
downloadlua-language-server-735e2e180ee45dc4bb6e2ac86e5dbdac591e5974.zip
fix
Diffstat (limited to 'script')
-rw-r--r--script/core/infer.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/script/core/infer.lua b/script/core/infer.lua
index ce546455..4bd8d40e 100644
--- a/script/core/infer.lua
+++ b/script/core/infer.lua
@@ -128,8 +128,10 @@ local function searchInferOfValue(value, infers, mark)
if value.type == 'table' then
if value.array then
local node = m.searchAndViewInfers(value.array, nil, mark)
- local infer = node .. '[]'
- infers[infer] = true
+ if node ~= 'any' then
+ local infer = node .. '[]'
+ infers[infer] = true
+ end
else
infers['table'] = true
end