diff options
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/completion/init.lua | 15 | ||||
-rw-r--r-- | server/test/definition/emmy.lua | 5 | ||||
-rw-r--r-- | server/test/diagnostics/init.lua | 17 |
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!> +]] |