Skip to content

Commit decf02a

Browse files
committed
fix description disapeared for overloaded function
1 parent 4503eff commit decf02a

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 3.6.1
44
* `FIX` wrong diagnostics for `pcall` and `xpcall`
55
* `FIX` duplicate fields in table hover
6+
* `FIX` description disapeared for overloaded function
67

78
## 3.6.0
89
`2022-11-8`

script/parser/luadoc.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,8 +1895,6 @@ local function bindCommentsAndFields(binded)
18951895
class.calls[#class.calls+1] = doc
18961896
doc.class = class
18971897
end
1898-
bindCommentsToDoc(doc, comments)
1899-
comments = {}
19001898
elseif doc.type == 'doc.alias'
19011899
or doc.type == 'doc.enum' then
19021900
bindCommentsToDoc(doc, comments)

test/crossfile/hover.lua

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,3 +1681,27 @@ See:
16811681
* [A](file:///a.lua#1#10) comment1
16821682
* [TTT](file:///a.lua#3#0) comment2]]
16831683
}
1684+
1685+
TEST { {path = 'a.lua', content = [[
1686+
---comment1
1687+
---comment2
1688+
---@overload fun()
1689+
---@param x number
1690+
local function <?f?>(x) end
1691+
]]},
1692+
hover = [[
1693+
```lua
1694+
function f(x: number)
1695+
```
1696+
1697+
---
1698+
1699+
comment1
1700+
comment2
1701+
1702+
---
1703+
1704+
```lua
1705+
function f()
1706+
```]]
1707+
}

0 commit comments

Comments
 (0)