summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-08-15 11:26:47 +0800
committerGitHub <noreply@github.com>2023-08-15 11:26:47 +0800
commit7a47ada3ee2cf717d266a8438aeb657963ba0070 (patch)
treedb21066b322687e0183ec9b1e9c475ce7c798f5a
parentf09aa4104a56996e838dd30d28bbef706e461469 (diff)
parent39bb7916ff6a002dc6388fe35a95653a8e23aa16 (diff)
downloadlua-language-server-7a47ada3ee2cf717d266a8438aeb657963ba0070.zip
Merge pull request #2263 from overhacked/ignore_cast-local-type_underscore
Ignore `cast-local-type` diagnostic for `_` local
-rw-r--r--script/core/diagnostics/cast-local-type.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/core/diagnostics/cast-local-type.lua b/script/core/diagnostics/cast-local-type.lua
index 1998b915..26445374 100644
--- a/script/core/diagnostics/cast-local-type.lua
+++ b/script/core/diagnostics/cast-local-type.lua
@@ -16,6 +16,9 @@ return function (uri, callback)
if not loc.ref then
return
end
+ if loc[1] == '_' then
+ return
+ end
await.delay()
local locNode = vm.compileNode(loc)
if not locNode.hasDefined then