summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md1
-rw-r--r--script/parser/luadoc.lua8
-rw-r--r--test/diagnostics/init.lua8
3 files changed, 9 insertions, 8 deletions
diff --git a/changelog.md b/changelog.md
index ee9f2fcf..fc18e49b 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,6 +1,7 @@
# changelog
## 2.5.2
+* `FIX` [#825](https://github.com/sumneko/lua-language-server/issues/825)
* `FIX` [#837](https://github.com/sumneko/lua-language-server/issues/837)
## 2.5.1
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index d206e6d7..bfadcf8a 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -258,15 +258,7 @@ local function parseClass(parent)
end
result.start = getStart()
result.finish = getFinish()
- if not peekToken() then
- return result
- end
if not checkToken('symbol', ':', 1) then
- pushError {
- type = 'LUADOC_MISS_EXTENDS_SYMBOL',
- start = result.finish + 1,
- finish = getStart(),
- }
return result
end
nextToken()
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua
index 4bf7e81d..1bbd83b9 100644
--- a/test/diagnostics/init.lua
+++ b/test/diagnostics/init.lua
@@ -1514,3 +1514,11 @@ return {
x = 1,
}
]]
+
+TEST [[
+---@class A #1
+]]
+
+TEST [[
+---@class A 1
+]]