diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-16 21:13:07 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-16 21:13:07 +0800 |
commit | b1d96627a1af5e4485720636dfb1d4f767e184d5 (patch) | |
tree | 09667e0d55139d8093f3dde565919619def885e7 /test/diagnostics | |
parent | 1aa0cf49b70dc2489d116e412ecf632c95178f24 (diff) | |
download | lua-language-server-b1d96627a1af5e4485720636dfb1d4f767e184d5.zip |
don't check `unknown`
Diffstat (limited to 'test/diagnostics')
-rw-r--r-- | test/diagnostics/common.lua | 27 |
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 +]] |