scala/scala3

Scaladoc fails to re-substitute macros for inherited members

Open

#10,823 创建于 2020年12月16日

在 GitHub 查看
 (7 评论) (0 反应) (1 负责人)Scala (1,159 fork)batch import
area:doctoolgood first issueitype:bug

仓库指标

Star
 (6,247 star)
PR 合并指标
 (平均合并 18天 14小时) (30 天内合并 133 个 PR)

描述

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.

贡献者指南