diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-22 17:51:15 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-22 17:51:15 +0800 |
commit | 05a098f7ed731b2a3a6d068d5e9d7dfeacc67be0 (patch) | |
tree | 7f14a20db22167613559ea154f90fdc9d6cdf042 /script/core/diagnostics/unreachable-code.lua | |
parent | 65706920bff73e2d50048b977da65e7ede06f6f8 (diff) | |
download | lua-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.lua | 3 |
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 |