diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-18 01:20:54 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-18 01:20:54 +0800 |
commit | 5099d8be7125b948691d099b0e0084a72620293b (patch) | |
tree | 2bc0b2cd2fc670b7babd2967225c17aed378e147 /test | |
parent | 6df9d8376bc5339a8c4218cc261dc76d7ac8e7ad (diff) | |
download | lua-language-server-5099d8be7125b948691d099b0e0084a72620293b.zip |
update
Diffstat (limited to 'test')
-rw-r--r-- | test/diagnostics/common.lua | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua index 203bb7b6..2b3104d1 100644 --- a/test/diagnostics/common.lua +++ b/test/diagnostics/common.lua @@ -1684,6 +1684,23 @@ x = nil ]] TEST [[ +---@diagnostic disable: unused-local + +---@type table +local x + +<!x!> = nil +]] + +TEST [[ +---@diagnostic disable: unused-local + +local x + +x = nil +]] + +TEST [[ ---@diagnostic disable: unused-local, undefined-global ---@type integer @@ -1780,6 +1797,23 @@ x = x + #t TEST [[ ---@diagnostic disable: unused-local +local x = 0 + +x = 1.0 +]] + +TEST [[ +---@diagnostic disable: unused-local + +---@type integer +local x = 0 + +<!x!> = 1.0 +]] + +TEST [[ +---@diagnostic disable: unused-local + ---@class A ---@field x integer local t |