summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/parser/luadoc.lua3
-rw-r--r--test/type_inference/init.lua12
2 files changed, 15 insertions, 0 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index dbfc6493..2e0125c5 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -1450,6 +1450,9 @@ local function isContinuedDoc(lastDoc, nextDoc)
if not nextDoc then
return false
end
+ if nextDoc.type == 'doc.diagnostic' then
+ return true
+ end
if lastDoc.type == 'doc.type'
or lastDoc.type == 'doc.module' then
return false
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index a934a85d..94ee5638 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3364,3 +3364,15 @@ local t
local <?x?> = t[1]
]]
+
+TEST 'integer' [[
+---@type integer
+---@diagnostic disable
+local <?t?>
+]]
+
+TEST 'A' [[
+---@class A
+---@diagnostic disable
+local <?t?>
+]]