diff options
-rw-r--r-- | script/parser/guide.lua | 10 | ||||
-rw-r--r-- | test/definition/luadoc.lua | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua index 8a852109..7ca3ddd0 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -1554,6 +1554,16 @@ function m.checkSameSimpleByDoc(status, obj, start, queue, mode) force = true, } end + if obj.extends then + local pieceResult = stepRefOfDocType(status, obj.extends, 'def') + for _, res in ipairs(pieceResult) do + queue[#queue+1] = { + obj = res, + start = start, + force = true, + } + end + end end return true elseif obj.type == 'doc.type' then diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua index 9360e27c..c875a628 100644 --- a/test/definition/luadoc.lua +++ b/test/definition/luadoc.lua @@ -127,6 +127,17 @@ TEST [[ ---@type <?A?> ]] +TEST [[ +---@class X +---@field <!a!> string + +---@class Y:X + +---@type Y +local y +y.<?a?> +]] + -- TODO do return end TEST [[ |