Skip to content

Commit

Permalink
fix #1672
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Nov 7, 2022
1 parent 6176475 commit 8ed72a9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ server will generate `doc.json` and `doc.md` in `LOGPATH`.
* `FIX` [#1640]
* `FIX` [#1642]
* `FIX` [#1662]
* `FIX` [#1672]

[#1153]: https://github.com/sumneko/lua-language-server/issues/1153
[#1177]: https://github.com/sumneko/lua-language-server/issues/1177
Expand Down Expand Up @@ -191,6 +192,7 @@ server will generate `doc.json` and `doc.md` in `LOGPATH`.
[#1662]: https://github.com/sumneko/lua-language-server/issues/1662
[#1663]: https://github.com/sumneko/lua-language-server/issues/1663
[#1670]: https://github.com/sumneko/lua-language-server/issues/1670
[#1672]: https://github.com/sumneko/lua-language-server/issues/1672

## 3.5.6
`2022-9-16`
Expand Down
3 changes: 1 addition & 2 deletions script/core/hover/label.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ local function asValue(source, title)
and ( type == 'table'
or type == 'any'
or type == 'unknown'
or type == 'nil'
or type:sub(1, 1) == '{') then
or type == 'nil') then
else
pack[#pack+1] = type
end
Expand Down
14 changes: 13 additions & 1 deletion test/hover/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,7 @@ TEST [[
local <?t?>
]]
[[
local t: {
local t: { x: string, y: number, z: boolean } {
x: string,
y: number,
z: boolean,
Expand Down Expand Up @@ -2403,3 +2403,15 @@ TEST [[
[[
(field) A.x: number
]]

TEST [[
---@type { [string]: string }[]
local t
print(<?t?>.foo)
]]
[[
local t: { [string]: string }[] {
foo: unknown,
}
]]

0 comments on commit 8ed72a9

Please sign in to comment.