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 | |
parent | e0e3c9ab6b69b16b8949f93f309461f298038fa4 (diff) | |
download | lua-language-server-0ff98557a45c25d7a49520e57f49561a62300f35.zip |
update
Diffstat (limited to 'test')
-rw-r--r-- | test/diagnostics/type-check.lua | 14 | ||||
-rw-r--r-- | test/hover/init.lua | 2 |
2 files changed, 15 insertions, 1 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') diff --git a/test/hover/init.lua b/test/hover/init.lua index a97cf3ae..0ee62c1b 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -772,7 +772,7 @@ local <?t?> = { ]] [[ local t: { - f?: file*, + f: file*, } ]] |