diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-12-06 20:23:09 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-12-06 20:23:09 +0800 |
commit | 9471213c956223fc9746d77b2082cd970c6617f8 (patch) | |
tree | a2167b8117bf1d6a76d6bd16c3a7b50813347db4 /test | |
parent | d060e870a5d24e3e575459a0e02d229d9234109a (diff) | |
download | lua-language-server-9471213c956223fc9746d77b2082cd970c6617f8.zip |
#842
Diffstat (limited to 'test')
-rw-r--r-- | test/crossfile/hover.lua | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua index 82af9c32..492efe43 100644 --- a/test/crossfile/hover.lua +++ b/test/crossfile/hover.lua @@ -1072,3 +1072,64 @@ global G: A { } ```]] } + +TEST { + { + path = 'a.lua', + content = [[ + ---@overload fun(self, a) + function C:<?f?>(a, b) end + ]] + }, + hover = [[ +```lua +method C:f(a: any, b: any) +``` + +--- + +```lua +method C:f(a: any) +```]] +} + +TEST { + { + path = 'a.lua', + content = [[ + ---@overload fun(self, a) + function C.<?f?>(a, b) end + ]] + }, + hover = [[ +```lua +function C.f(a: any, b: any) +``` + +--- + +```lua +function C.f(self: any, a: any) +```]] +} + +TEST { + { + path = 'a.lua', + content = [[ + ---@async + ---@overload async fun(self, a) + function C:<?f?>(a, b) end + ]] + }, + hover = [[ +```lua +async method C:f(a: any, b: any) +``` + +--- + +```lua +async method C:f(a: any) +```]] +} |