summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-14 21:00:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-14 21:00:21 +0800
commit329cd44aedec15f1048742d98baacdd71d434a6e (patch)
tree832c05928c417aa2a5b5c2e2f8428bd143b26226 /script
parent7bf48ded2644c706bd91e20420fe94bba05d2b51 (diff)
downloadlua-language-server-329cd44aedec15f1048742d98baacdd71d434a6e.zip
don't chek nil of any
Diffstat (limited to 'script')
-rw-r--r--script/core/diagnostics/need-check-nil.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/core/diagnostics/need-check-nil.lua b/script/core/diagnostics/need-check-nil.lua
index 98fdfd08..56cb1eae 100644
--- a/script/core/diagnostics/need-check-nil.lua
+++ b/script/core/diagnostics/need-check-nil.lua
@@ -28,7 +28,7 @@ return function (uri, callback)
return
end
local node = vm.compileNode(src)
- if node:hasFalsy() then
+ if node:hasFalsy() and not vm.getInfer(src):hasType(uri, 'any') then
callback {
start = src.start,
finish = src.finish,