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.lua27
1 files changed, 25 insertions, 2 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index 3a3d1d46..73337e58 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)