summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-16 21:13:07 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-16 21:13:07 +0800
commitb1d96627a1af5e4485720636dfb1d4f767e184d5 (patch)
tree09667e0d55139d8093f3dde565919619def885e7 /test/diagnostics
parent1aa0cf49b70dc2489d116e412ecf632c95178f24 (diff)
downloadlua-language-server-b1d96627a1af5e4485720636dfb1d4f767e184d5.zip
don't check `unknown`
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/common.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index d7ec4b63..b5f490a2 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -1617,3 +1617,30 @@ local x
<!x!> = true
]]
+
+TEST [[
+---@diagnostic disable: unused-local
+
+---@type unknown
+local x
+
+x = nil
+]]
+
+TEST [[
+---@diagnostic disable: unused-local
+
+---@type unknown
+local x
+
+x = 1
+]]
+
+TEST [[
+---@diagnostic disable: unused-local
+
+---@type unknown|nil
+local x
+
+x = 1
+]]