summaryrefslogtreecommitdiff
path: root/test/crossfile
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-12-06 20:23:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-12-06 20:23:09 +0800
commit9471213c956223fc9746d77b2082cd970c6617f8 (patch)
treea2167b8117bf1d6a76d6bd16c3a7b50813347db4 /test/crossfile
parentd060e870a5d24e3e575459a0e02d229d9234109a (diff)
downloadlua-language-server-9471213c956223fc9746d77b2082cd970c6617f8.zip
#842
Diffstat (limited to 'test/crossfile')
-rw-r--r--test/crossfile/hover.lua61
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)
+```]]
+}