summaryrefslogtreecommitdiff
path: root/test/completion/common.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/completion/common.lua')
-rw-r--r--test/completion/common.lua57
1 files changed, 57 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index 38104d41..cc164d3a 100644
--- a/test/completion/common.lua
+++ b/test/completion/common.lua
@@ -3847,3 +3847,60 @@ print(t2.A.<??>)
kind = define.CompletionItemKind.Field,
},
}
+
+TEST [[
+---@overload fun(x: number)
+---@overload fun(x: number, y: number)
+local function fff(...)
+end
+
+fff<??>
+]]
+{
+ {
+ label = 'fff(x)',
+ kind = define.CompletionItemKind.Function,
+ },
+ {
+ label = 'fff(x, y)',
+ kind = define.CompletionItemKind.Function,
+ },
+}
+
+TEST [[
+---@overload fun(x: number)
+---@overload fun(x: number, y: number)
+function fff(...)
+end
+
+fff<??>
+]]
+{
+ {
+ label = 'fff(x)',
+ kind = define.CompletionItemKind.Function,
+ },
+ {
+ label = 'fff(x, y)',
+ kind = define.CompletionItemKind.Function,
+ },
+}
+
+TEST [[
+---@overload fun(x: number)
+---@overload fun(x: number, y: number)
+function t.fff(...)
+end
+
+t.fff<??>
+]]
+{
+ {
+ label = 'fff(x)',
+ kind = define.CompletionItemKind.Function,
+ },
+ {
+ label = 'fff(x, y)',
+ kind = define.CompletionItemKind.Function,
+ },
+}