summaryrefslogtreecommitdiff
path: root/test/completion/common.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2021-12-21 22:49:59 +0800
committersumneko <sumneko@hotmail.com>2021-12-21 22:49:59 +0800
commitb7344640a0ab9a07551ee5ebc435657b45659553 (patch)
tree0fef08a7dbb0a115e0e1249b6123fd529cf1fc58 /test/completion/common.lua
parentc47baf932309a05673b7931fdf6a1be207fb7bc4 (diff)
parentec4f497aa2624d9dce29e1de0cfd28ecd85e7df3 (diff)
downloadlua-language-server-b7344640a0ab9a07551ee5ebc435657b45659553.zip
Merge remote-tracking branch 'origin/master' into multi-workspace
Diffstat (limited to 'test/completion/common.lua')
-rw-r--r--test/completion/common.lua27
1 files changed, 25 insertions, 2 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index 94b55514..b03d55ca 100644
--- a/test/completion/common.lua
+++ b/test/completion/common.lua
@@ -2593,7 +2593,7 @@ c:<??>
TEST [[
---@class Class
----@field on fun(x: "'aaa'"|"'bbb'")
+---@field on fun(self, x: "'aaa'"|"'bbb'")
local c
c:on(<??>)
@@ -2605,7 +2605,7 @@ TEST [[
---@field on fun(x: "'aaa'"|"'bbb'")
local c
-c:on('<??>')
+c.on('<??>')
]]
(EXISTS)
@@ -3037,3 +3037,26 @@ end)
}
},
}
+
+TEST [[
+---@meta
+
+---@alias testAlias
+---| "'test1'"
+---| "'test2'"
+---| "'test3'"
+
+---@class TestClass
+local TestClass = {}
+
+---@overload fun(self: TestClass, arg2: testAlias)
+---@param arg1 integer
+---@param arg2 testAlias
+function TestClass:testFunc2(arg1, arg2) end
+
+---@type TestClass
+local t
+
+t:testFunc2(<??>)
+]]
+(EXISTS)