summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
Diffstat (limited to 'test/completion')
-rw-r--r--test/completion/common.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index b5ffe173..fc2183d7 100644
--- a/test/completion/common.lua
+++ b/test/completion/common.lua
@@ -4462,3 +4462,30 @@ new 'A' {
kind = define.CompletionItemKind.Property,
}
}
+
+TEST [[
+---@enum(key) enum
+local t = {
+ a = 1,
+ b = 2,
+ c = 3,
+}
+
+---@class A
+local M
+
+---@param optional enum
+function M:optional(optional)
+end
+
+---@return A
+function M:self()
+ return self
+end
+
+---@type A
+local m
+
+m:self(<??>):optional()
+]]
+(nil)