diff options
author | Crollie Rollz <crollierollz@gmail.com> | 2022-04-03 02:10:57 +0800 |
---|---|---|
committer | Crollie Rollz <crollierollz@gmail.com> | 2022-04-03 03:08:23 +0800 |
commit | 9f46e568af0a63e0db46596de3b32c779d27c5cd (patch) | |
tree | 65dca96653ab4aec73430b4fbf82413b119e2613 /test/completion | |
parent | af68d1e84435b1fbbf30ef24658255206f1ff7b3 (diff) | |
download | lua-language-server-9f46e568af0a63e0db46596de3b32c779d27c5cd.zip |
fix(completion): call OOP emitter without colon syntax
Diffstat (limited to 'test/completion')
-rw-r--r-- | test/completion/common.lua | 16 |
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<??> |