diff --git a/changelog.md b/changelog.md index 30926783a..313cb53bf 100644 --- a/changelog.md +++ b/changelog.md @@ -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 diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index d0a1d38c6..72e5dc18d 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -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