diff options
Diffstat (limited to 'script/core/diagnostics/unreachable-code.lua')
-rw-r--r-- | script/core/diagnostics/unreachable-code.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/script/core/diagnostics/unreachable-code.lua b/script/core/diagnostics/unreachable-code.lua index a386198c..84b25b45 100644 --- a/script/core/diagnostics/unreachable-code.lua +++ b/script/core/diagnostics/unreachable-code.lua @@ -24,7 +24,8 @@ local function hasReturn(block) return hasElse == true else if block.type == 'while' then - if vm.testCondition(block.filter) then + if vm.testCondition(block.filter) + and not block.breaks then return true end end |