summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/core/diagnostics/unreachable-code.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/script/core/diagnostics/unreachable-code.lua b/script/core/diagnostics/unreachable-code.lua
index 28aee6ea..a386198c 100644
--- a/script/core/diagnostics/unreachable-code.lua
+++ b/script/core/diagnostics/unreachable-code.lua
@@ -3,6 +3,7 @@ local guide = require 'parser.guide'
local vm = require 'vm'
local lang = require 'language'
local await = require 'await'
+local define = require 'proto.define'
---@param block parser.object
---@return boolean
@@ -56,8 +57,9 @@ return function (uri, callback)
and hasReturn(action) then
if i < #source then
callback {
- start = source[i+1].start,
- finish = source[#source].finish,
+ start = source[i+1].start,
+ finish = source[#source].finish,
+ tags = { define.DiagnosticTag.Unnecessary },
message = lang.script('DIAG_UNREACHABLE_CODE'),
}
end