Skip to content

Scaladoc fails to re-substitute macros for inherited members #10823

@Lasering

Description

@Lasering

Minimized code

/** @define macro Super */
abstract class Super {
  /** $macro */
  def inherited: Int = 5
  /** $macro */
  def implemented: Unit
  /** $macro */
  def overridden: String = "test"
}
/**
 * @define name default
 * @define dummy dummy
 */
trait A[T] {
  /** List $name */
  def list(): List[T]
  /** Gets the $name with the given $dummy */
  def get(id: String): Option[T] = None
}
/** @define dummy id */
trait B extends A[String]
/**
 * @define macro Sub
 * @define name banana
 */
class Sub extends Super with B {
  def list(): List[String] = List.empty
  def implemented: Unit = ()
  override def overridden: String = "overridden test"
}

build.sbt

name := "scala-doc-tests"
version := "0.1.0"
scalaVersion := "3.0.0-M2"

Run:

mkdir docs
sbt doc

Expectation

The resulting documentation has the same problems as described scala/bug#9785.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions