diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 02:45:02 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 02:45:02 +0800 |
commit | 0ff98557a45c25d7a49520e57f49561a62300f35 (patch) | |
tree | 41d19002f9051f6d48613271d0edcfe712ae3ea3 /test/diagnostics | |
parent | e0e3c9ab6b69b16b8949f93f309461f298038fa4 (diff) | |
download | lua-language-server-0ff98557a45c25d7a49520e57f49561a62300f35.zip |
update
Diffstat (limited to 'test/diagnostics')
-rw-r--r-- | test/diagnostics/type-check.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index afd0a5b6..6b2c522f 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -366,5 +366,19 @@ local t ---@cast t <!number!> ]] +TEST [[ +local n + +if G then + n = {} +else + n = nil +end + +local t = { + x = n, +} +]] + config.remove(nil, 'Lua.diagnostics.disable', 'unused-local') config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global') |