summaryrefslogtreecommitdiff
path: root/script/core/diagnostics/unknown-cast-variable.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-01-09 20:14:02 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-01-09 20:14:02 +0800
commit6f889136264e39a9c47e8cce569274414c9b4a50 (patch)
treeccfa83257aeec26c03ad42c10e0ddac459d48acf /script/core/diagnostics/unknown-cast-variable.lua
parent1ca3b7d67c0c30af1f67fae71b5c770b9008e4d5 (diff)
downloadlua-language-server-6f889136264e39a9c47e8cce569274414c9b4a50.zip
cast global
Diffstat (limited to 'script/core/diagnostics/unknown-cast-variable.lua')
-rw-r--r--script/core/diagnostics/unknown-cast-variable.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/script/core/diagnostics/unknown-cast-variable.lua b/script/core/diagnostics/unknown-cast-variable.lua
index 3f082a50..7c12e4d3 100644
--- a/script/core/diagnostics/unknown-cast-variable.lua
+++ b/script/core/diagnostics/unknown-cast-variable.lua
@@ -16,15 +16,15 @@ return function (uri, callback)
end
for _, doc in ipairs(state.ast.docs) do
- if doc.type == 'doc.cast' and doc.loc then
+ if doc.type == 'doc.cast' and doc.name then
await.delay()
- local defs = vm.getDefs(doc.loc)
+ local defs = vm.getDefs(doc.name)
local loc = defs[1]
if not loc then
callback {
- start = doc.loc.start,
- finish = doc.loc.finish,
- message = lang.script('DIAG_UNKNOWN_CAST_VARIABLE', doc.loc[1])
+ start = doc.name.start,
+ finish = doc.name.finish,
+ message = lang.script('DIAG_UNKNOWN_CAST_VARIABLE', doc.name[1])
}
end
end