summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/completion/common.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index 613f9b0c..1cdff803 100644
--- a/test/completion/common.lua
+++ b/test/completion/common.lua
@@ -3348,3 +3348,37 @@ local xyz
kind = define.CompletionItemKind.Variable,
}
}
+
+TEST [[
+---@type `CONST.X` | `CONST.Y`
+local x
+
+if x == <??>
+]]
+{
+ {
+ label = 'CONST.X',
+ kind = define.CompletionItemKind.EnumMember,
+ },
+ {
+ label = 'CONST.Y',
+ kind = define.CompletionItemKind.EnumMember,
+ },
+}
+
+TEST [[
+---@param x `CONST.X` | `CONST.Y`
+local function f(x) end
+
+f(<??>)
+]]
+{
+ {
+ label = 'CONST.X',
+ kind = define.CompletionItemKind.EnumMember,
+ },
+ {
+ label = 'CONST.Y',
+ kind = define.CompletionItemKind.EnumMember,
+ },
+}