Skip to content

Commit

Permalink
fix: bind variables with @class using tail comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlau10 committed Jan 19, 2025
1 parent 12013ba commit 3ce90e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* `FIX` Fixed the error that the configuration file pointed to by the `--configpath` option was not read and loaded.
* `FIX` Generic return can be optional.
* `FIX` Fixed the comment calculating in docs `---@param a string?Comment` - now its `Comment` instead of `omment`.
* `FIX` Fixed cannot bind variables using tail comment `@class` [#2673](https://github.com/LuaLS/lua-language-server/issues/2673)
* `NEW` `---@class` supports attribute `partial`, which will not check missing inherited fields [#3023](https://github.com/LuaLS/lua-language-server/issues/3023)
```lua
---@class Config
Expand Down
2 changes: 1 addition & 1 deletion script/parser/luadoc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2181,7 +2181,7 @@ local function bindDocs(state)
if doc.specialBindGroup then
bindDocWithSources(sources, doc.specialBindGroup)
binded = nil
elseif isTailComment(text, doc) and doc.type ~= "doc.class" and doc.type ~= "doc.field" then
elseif isTailComment(text, doc) and doc.type ~= "doc.field" then
bindDocWithSources(sources, binded)
binded = nil
else
Expand Down

0 comments on commit 3ce90e0

Please sign in to comment.