scala/scala3
View on GitHubScaladoc fails to re-substitute macros for inherited members
Open
#10,823 opened on Dec 16, 2020
area:doctoolgood first issueitype:bug
Description
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 https://github.com/scala/bug/issues/9785.