summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-09-29 15:14:51 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-09-29 15:14:51 +0800
commitec613851607c1fdeb256afa195d79760bb2e66c6 (patch)
tree2e9265735ab568badd53c66cd7abfe936b869cc5
parent5881d4846e20499d3dafe643f1a5fb355756ed7b (diff)
downloadlua-language-server-ec613851607c1fdeb256afa195d79760bb2e66c6.zip
fix
-rw-r--r--script/core/infer.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/core/infer.lua b/script/core/infer.lua
index 58308857..997df9a3 100644
--- a/script/core/infer.lua
+++ b/script/core/infer.lua
@@ -603,7 +603,7 @@ function m.hasType(source, tp, mark)
end
if tp == 'function' then
for infer in pairs(infers) do
- if infer:sub(1, 4) == 'fun(' then
+ if infer ~= 0 and infer:sub(1, 4) == 'fun(' then
return true
end
end