Skip to content

Commit a00de14

Browse files
committed
#1280 doc.diagnostic don't break docs
1 parent c0ee6e9 commit a00de14

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

script/parser/luadoc.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,6 +1450,9 @@ local function isContinuedDoc(lastDoc, nextDoc)
14501450
if not nextDoc then
14511451
return false
14521452
end
1453+
if nextDoc.type == 'doc.diagnostic' then
1454+
return true
1455+
end
14531456
if lastDoc.type == 'doc.type'
14541457
or lastDoc.type == 'doc.module' then
14551458
return false

test/type_inference/init.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3364,3 +3364,15 @@ local t
33643364
33653365
local <?x?> = t[1]
33663366
]]
3367+
3368+
TEST 'integer' [[
3369+
---@type integer
3370+
---@diagnostic disable
3371+
local <?t?>
3372+
]]
3373+
3374+
TEST 'A' [[
3375+
---@class A
3376+
---@diagnostic disable
3377+
local <?t?>
3378+
]]

0 commit comments

Comments
 (0)