diff --git a/changelog.md b/changelog.md index fcd8ebcb6..85250b924 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,7 @@ * `CHG` hover: split `local` into `local` / `parameter` / `upvalue` / `self`. * `CHG` hover: added parentheses to some words, such as `global` / `field` / `class`. * `FIX` definition of `table` +* `FIX` [#994](https://github.com/sumneko/lua-language-server/issues/994) * `FIX` [#1057](https://github.com/sumneko/lua-language-server/issues/1057) * `FIX` runtime errors reported by telemetry, see [#1058](https://github.com/sumneko/lua-language-server/issues/1058) diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index 5928ec1c1..7c669d1f0 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -1406,6 +1406,7 @@ local function bindDocsBetween(sources, binded, bindSources, start, finish) or src.type == 'tableindex' or src.type == 'setfield' or src.type == 'setindex' + or src.type == 'setmethod' or src.type == 'function' then src.bindDocs = binded bindSources[#bindSources+1] = src diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua index 2a9cefe05..f52a9b209 100644 --- a/test/diagnostics/common.lua +++ b/test/diagnostics/common.lua @@ -1395,3 +1395,13 @@ T.x = 1 print() ]] + +TEST [[ +T = {} + +---@deprecated +function T:ff() +end + +() +]]