summaryrefslogtreecommitdiff
path: root/script/core/diagnostics/unreachable-code.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-22 17:51:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-22 17:51:15 +0800
commit05a098f7ed731b2a3a6d068d5e9d7dfeacc67be0 (patch)
tree7f14a20db22167613559ea154f90fdc9d6cdf042 /script/core/diagnostics/unreachable-code.lua
parent65706920bff73e2d50048b977da65e7ede06f6f8 (diff)
downloadlua-language-server-05a098f7ed731b2a3a6d068d5e9d7dfeacc67be0.zip
fix #1363 don't lookup globals in blocks
Diffstat (limited to 'script/core/diagnostics/unreachable-code.lua')
-rw-r--r--script/core/diagnostics/unreachable-code.lua3
1 files changed, 0 insertions, 3 deletions
diff --git a/script/core/diagnostics/unreachable-code.lua b/script/core/diagnostics/unreachable-code.lua
index 84b25b45..772a1764 100644
--- a/script/core/diagnostics/unreachable-code.lua
+++ b/script/core/diagnostics/unreachable-code.lua
@@ -50,9 +50,6 @@ return function (uri, callback)
---@async
guide.eachSourceTypes(state.ast, {'main', 'function'}, function (source)
await.delay()
- if not source.returns then
- return
- end
for i, action in ipairs(source) do
if guide.isBlockType(action)
and hasReturn(action) then