Skip to content

Commit 3ce90e0

Browse files
committed
fix: bind variables with @class using tail comments
1 parent 12013ba commit 3ce90e0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* `FIX` Fixed the error that the configuration file pointed to by the `--configpath` option was not read and loaded.
1616
* `FIX` Generic return can be optional.
1717
* `FIX` Fixed the comment calculating in docs `---@param a string?Comment` - now its `Comment` instead of `omment`.
18+
* `FIX` Fixed cannot bind variables using tail comment `@class` [#2673](https://github.com/LuaLS/lua-language-server/issues/2673)
1819
* `NEW` `---@class` supports attribute `partial`, which will not check missing inherited fields [#3023](https://github.com/LuaLS/lua-language-server/issues/3023)
1920
```lua
2021
---@class Config

script/parser/luadoc.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2181,7 +2181,7 @@ local function bindDocs(state)
21812181
if doc.specialBindGroup then
21822182
bindDocWithSources(sources, doc.specialBindGroup)
21832183
binded = nil
2184-
elseif isTailComment(text, doc) and doc.type ~= "doc.class" and doc.type ~= "doc.field" then
2184+
elseif isTailComment(text, doc) and doc.type ~= "doc.field" then
21852185
bindDocWithSources(sources, binded)
21862186
binded = nil
21872187
else

0 commit comments

Comments
 (0)