summaryrefslogtreecommitdiff
path: root/test/diagnostics/type-check.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-11-10 12:10:55 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-11-10 12:10:55 +0800
commit095a67057ba7df8a7bd5e7a58198348615cbdf87 (patch)
treeae9a1608eb999f084e77d07453b08e7c2709ad3c /test/diagnostics/type-check.lua
parent9e61b29f8039fc7c41c792ad69c1df5d21e864fd (diff)
downloadlua-language-server-095a67057ba7df8a7bd5e7a58198348615cbdf87.zip
fix #1684
Diffstat (limited to 'test/diagnostics/type-check.lua')
-rw-r--r--test/diagnostics/type-check.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua
index d04a2f5e..2547fde3 100644
--- a/test/diagnostics/type-check.lua
+++ b/test/diagnostics/type-check.lua
@@ -1119,6 +1119,16 @@ TEST [[
local t = {{'a'}}
]]
+TEST [[
+local A = "Hello"
+local B = "World"
+
+---@alias myLiteralAliases `A` | `B`
+
+---@type myLiteralAliases
+local x = A
+]]
+
config.remove(nil, 'Lua.diagnostics.disable', 'unused-local')
config.remove(nil, 'Lua.diagnostics.disable', 'unused-function')
config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global')