summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-24 19:22:59 +0800
committersumneko <sumneko@hotmail.com>2019-04-24 19:22:59 +0800
commitdb2de7238fb92269b7ad6aca8a35f82e01eaa126 (patch)
tree143dbf9e6b5f28db1c20585b36ba959fcaf890b0 /server/test
parentaea74ee33de825921500c3210a65a10ef3c8a8e0 (diff)
downloadlua-language-server-db2de7238fb92269b7ad6aca8a35f82e01eaa126.zip
emmy.alias
Diffstat (limited to 'server/test')
-rw-r--r--server/test/completion/init.lua15
-rw-r--r--server/test/definition/emmy.lua5
-rw-r--r--server/test/diagnostics/init.lua17
3 files changed, 37 insertions, 0 deletions
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua
index 0f4b27d3..2b79aa4d 100644
--- a/server/test/completion/init.lua
+++ b/server/test/completion/init.lua
@@ -824,3 +824,18 @@ local abcd
kind = CompletionItemKind.Class,
},
}
+
+TEST [[
+---@alias abc abb
+---@type a$
+]]
+{
+ {
+ label = 'abc',
+ kind = CompletionItemKind.Class,
+ },
+ {
+ label = 'abb',
+ kind = CompletionItemKind.Class,
+ },
+}
diff --git a/server/test/definition/emmy.lua b/server/test/definition/emmy.lua
index 82bac7a8..93fbd2be 100644
--- a/server/test/definition/emmy.lua
+++ b/server/test/definition/emmy.lua
@@ -61,3 +61,8 @@ end
---@class A
local obj = setmetatable({}, mt)
]]
+
+TEST [[
+---@alias <!B A!>
+---@type <?B?>
+]]
diff --git a/server/test/diagnostics/init.lua b/server/test/diagnostics/init.lua
index 82fe51bd..827df06a 100644
--- a/server/test/diagnostics/init.lua
+++ b/server/test/diagnostics/init.lua
@@ -365,3 +365,20 @@ TEST [[
---@class A
---@type A|<!B!>|<!C!>
]]
+
+TEST [[
+---@class AAA
+---@alias B AAA
+
+---@type B
+]]
+
+TEST [[
+---@alias B <!AAA!>
+]]
+
+TEST [[
+---@class <!A!>
+---@class B
+---@alias <!A B!>
+]]