diff options
Diffstat (limited to 'test/completion')
-rw-r--r-- | test/completion/common.lua | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua index 3ea02ed7..b5ffe173 100644 --- a/test/completion/common.lua +++ b/test/completion/common.lua @@ -3842,6 +3842,35 @@ f(<??>) } TEST [[ +---@class optional +---@field enum enum + +---@enum(key) enum +local t = { + a = 1, + b = 2, +} + +---@param a optional +local function f(a) +end + +f { + enum = <??> +} +]] +{ + { + label = '"a"', + kind = define.CompletionItemKind.EnumMember, + }, + { + label = '"b"', + kind = define.CompletionItemKind.EnumMember, + }, +} + +TEST [[ -- <??> ]] @@ -4433,4 +4462,3 @@ new 'A' { kind = define.CompletionItemKind.Property, } } - |