summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-16 20:57:50 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-16 20:57:50 +0800
commit47beee7d7085af35f6869cb349e27dd09b82e7a4 (patch)
tree8b339629804656edc55c375d36c8769a0b5ff986 /test/diagnostics
parent8a9e8d9cfd12d43496c2bf16f70874af550d4e7e (diff)
downloadlua-language-server-47beee7d7085af35f6869cb349e27dd09b82e7a4.zip
infer `nil` as redundant return value
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/common.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index d9dfb0b9..d7ec4b63 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -1608,3 +1608,12 @@ local x = 0
<!x!> = true
]]
+
+TEST [[
+---@diagnostic disable: unused-local
+
+---@type integer
+local x
+
+<!x!> = true
+]]