summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
Diffstat (limited to 'test/completion')
-rw-r--r--test/completion/common.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index 22d9f554..95903acb 100644
--- a/test/completion/common.lua
+++ b/test/completion/common.lua
@@ -2682,6 +2682,22 @@ emit:on('won', <??>)
}
TEST [[
+--- @class Emit
+--- @field on fun(self: Emit, eventName: string, cb: function)
+--- @field on fun(self: Emit, eventName: '"died"', cb: fun(i: integer))
+--- @field on fun(self: Emit, eventName: '"won"', cb: fun(s: string))
+local emit = {}
+
+emit.on(emit, 'won', <??>)
+]]
+{
+ [1] = {
+ label = 'fun(s: string)',
+ kind = define.CompletionItemKind.Function,
+ }
+}
+
+TEST [[
local function f()
local inferCache
in<??>