diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-04-16 17:07:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-16 17:07:22 +0800 |
commit | 86ca6317bcdaf54e3b504f393547da010bf11841 (patch) | |
tree | c60c8a2d8a90db7b2a023d9137f010f9308f2908 /script | |
parent | 0e44a7db4cb535ee79630876ea02bccf5e2693a1 (diff) | |
parent | ce938c864604155fc081dab017867e7e461c61cc (diff) | |
download | lua-language-server-86ca6317bcdaf54e3b504f393547da010bf11841.zip |
Merge pull request #2585 from clay-golem/fix/discard-returns-trigger
Detect discard-returns in all block types
Diffstat (limited to 'script')
-rw-r--r-- | script/core/diagnostics/discard-returns.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/script/core/diagnostics/discard-returns.lua b/script/core/diagnostics/discard-returns.lua index cef7ece5..9e573596 100644 --- a/script/core/diagnostics/discard-returns.lua +++ b/script/core/diagnostics/discard-returns.lua @@ -12,9 +12,7 @@ return function (uri, callback) end ---@async guide.eachSourceType(state.ast, 'call', function (source) - local parent = source.parent - if parent.type ~= 'function' - and parent.type ~= 'main' then + if not guide.isBlockType(source.parent) then return end await.delay() |