package p
private[p] trait T {
/** @template */
type A
}
object O extends T
$ scaladoc -version
Scaladoc version 2.12.2 -- Copyright 2002-2017, LAMP/EPFL and Lightbend, Inc.
$ scaladoc O.scala
Exception in thread "main" java.lang.RuntimeException: 'type A' isn't a class, trait or object thus cannot be built as a member template.
at scala.sys.package$.error(package.scala:27)
at scala.tools.nsc.doc.model.ModelFactory$modelCreation$.createNoDocMemberTemplate$1(ModelFactory.scala:711)
at scala.tools.nsc.doc.model.ModelFactory$modelCreation$.createLazyTemplateMember(ModelFactory.scala:727)
at scala.tools.nsc.doc.model.ModelFactory$DocTemplateImpl.$anonfun$completeModel$2(ModelFactory.scala:381)
at scala.tools.nsc.doc.model.ModelFactory$DocTemplateImpl.completeModel(ModelFactory.scala:381)
at scala.tools.nsc.doc.model.ModelFactory$DocTemplateImpl.$anonfun$completeModel$1(ModelFactory.scala:377)
at scala.tools.nsc.doc.model.ModelFactory$DocTemplateImpl.completeModel(ModelFactory.scala:375)
at scala.tools.nsc.doc.model.ModelFactory$DocTemplateImpl.$anonfun$completeModel$1(ModelFactory.scala:377)
at scala.tools.nsc.doc.model.ModelFactory$DocTemplateImpl.completeModel(ModelFactory.scala:375)
at scala.tools.nsc.doc.model.ModelFactory.makeModel(ModelFactory.scala:55)
at scala.tools.nsc.doc.DocFactory.makeUniverse(DocFactory.scala:81)
at scala.tools.nsc.doc.DocFactory.generate$1(DocFactory.scala:124)
at scala.tools.nsc.doc.DocFactory.document(DocFactory.scala:131)
at scala.tools.nsc.ScalaDoc.process(ScalaDoc.scala:41)
at scala.tools.nsc.ScalaDoc$.main(ScalaDoc.scala:92)
at scala.tools.nsc.ScalaDoc.main(ScalaDoc.scala)