From 29b0c7064b1a0d623867c1136b84e5f1b5038f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 6 Dec 2021 20:37:24 +0800 Subject: fix #842 --- test/completion/common.lua | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'test/completion') 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) -- cgit v1.2.3