summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-16 21:13:07 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-16 21:13:07 +0800
commitb1d96627a1af5e4485720636dfb1d4f767e184d5 (patch)
tree09667e0d55139d8093f3dde565919619def885e7 /script/core
parent1aa0cf49b70dc2489d116e412ecf632c95178f24 (diff)
downloadlua-language-server-b1d96627a1af5e4485720636dfb1d4f767e184d5.zip
don't check `unknown`
Diffstat (limited to 'script/core')
-rw-r--r--script/core/diagnostics/cast-local-type.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/script/core/diagnostics/cast-local-type.lua b/script/core/diagnostics/cast-local-type.lua
index 1284e934..f466f923 100644
--- a/script/core/diagnostics/cast-local-type.lua
+++ b/script/core/diagnostics/cast-local-type.lua
@@ -16,10 +16,14 @@ return function (uri, callback)
if not loc.ref then
return
end
+ await.delay()
local locNode = vm.compileNode(loc)
if not locNode:getData 'hasDefined' then
return
end
+ if vm.getInfer(loc):hasUnknown(uri) then
+ return
+ end
for _, ref in ipairs(loc.ref) do
if ref.type == 'setlocal' then
await.delay()