diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-12-06 20:37:24 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-12-06 20:37:24 +0800 |
commit | 29b0c7064b1a0d623867c1136b84e5f1b5038f9a (patch) | |
tree | 6d914d02c11d22d777d82fdd803e529ebce27507 /test/completion/common.lua | |
parent | 9471213c956223fc9746d77b2082cd970c6617f8 (diff) | |
download | lua-language-server-29b0c7064b1a0d623867c1136b84e5f1b5038f9a.zip |
fix #842
Diffstat (limited to 'test/completion/common.lua')
-rw-r--r-- | test/completion/common.lua | 27 |
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) |