summaryrefslogtreecommitdiff
path: root/script/core/diagnostics/close-non-object.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-19 21:51:25 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-19 21:51:25 +0800
commit028a53341827dff350fe3a626404c607f4f67c8e (patch)
tree651656a80e00d76b5d8c56b4dd64e9ae37310684 /script/core/diagnostics/close-non-object.lua
parentbe85f2c855f9075cadae3219f4dc1f3ce1f920ca (diff)
downloadlua-language-server-028a53341827dff350fe3a626404c607f4f67c8e.zip
`close-non-object` don't check `unknown`
Diffstat (limited to 'script/core/diagnostics/close-non-object.lua')
-rw-r--r--script/core/diagnostics/close-non-object.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/core/diagnostics/close-non-object.lua b/script/core/diagnostics/close-non-object.lua
index d07aaebe..1a42b800 100644
--- a/script/core/diagnostics/close-non-object.lua
+++ b/script/core/diagnostics/close-non-object.lua
@@ -28,7 +28,8 @@ return function (uri, callback)
if not infer:hasClass(uri)
and not infer:hasType(uri, 'nil')
and not infer:hasType(uri, 'table')
- and infer:view(uri, 'any') ~= 'any' then
+ and not infer:hasUnknown(uri)
+ and not infer:hasAny(uri) then
callback {
start = source.value.start,
finish = source.value.finish,