diff options
Diffstat (limited to 'test/crossfile/hover.lua')
-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) +```]] +} |