Skip to content

Documentation inheritance doesn't work when parent method also has :inherit: #9968

@Blacksmoke16

Description

@Blacksmoke16
abstract struct Parent
  # Docs for `#values`.
  def values : Array(Int32)
    [1]
  end
end

abstract struct Child < Parent
  # :inherit:
  def values : Array(Int32)
    values = super

    values << 2

    values
  end
end

struct GrandChild < Child
  # :inherit:
  def values : Array(Int32)
    values = super

    values << 3

    values
  end
end

Given this structure, only Parent and Child will have Docs for #values. GrandChild simply has the string :inherit:. The implementation prob needs updated to go further up the tree if the parent method also has :inherit:.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions