import simulacrum.typeclass
@typeclass
trait MyTypeClass[A] {
type Out
/** Scaladoc for `myMethod` */
def myMethod(byName: A): Out
}
object MyTypeClass {
def shouldCompile(ops: MyTypeClass.Ops[Int]) = {
ops.myMethod
}
}
$ sbt ++2.12.2 doc
[warn] Executing in batch mode.
[warn] For better performance, hit [ENTER] to switch to interactive mode, or
[warn] consider launching sbt without any commands, or explicitly passing 'shell'
[info] Loading global plugins from /Users/twer/.sbt/0.13/plugins
[info] Loading project definition from /private/tmp/typeclassdoc/project
[info] Set current project to typeclassdoc (in build file:/private/tmp/typeclassdoc/)
[info] Setting version to 2.12.2
[info] Reapplying settings...
[info] Set current project to typeclassdoc (in build file:/private/tmp/typeclassdoc/)
[info] Main Scala API documentation to /private/tmp/typeclassdoc/target/scala-2.12/api...
[error] /private/tmp/typeclassdoc/MyTypeClass.scala:14: value myMethod is not a member of MyTypeClass.Ops[Int]
[error] ops.myMethod
[error] ^
[info] No documentation generated with unsuccessful compiler run
[error] one error found
[error] (compile:doc) Scaladoc generation failed
[error] Total time: 2 s, completed Jun 9, 2017 12:12:49 PM
$ sbt ++2.11.11 doc
[warn] Executing in batch mode.
[warn] For better performance, hit [ENTER] to switch to interactive mode, or
[warn] consider launching sbt without any commands, or explicitly passing 'shell'
[info] Loading global plugins from /Users/twer/.sbt/0.13/plugins
[info] Loading project definition from /private/tmp/typeclassdoc/project
[info] Set current project to typeclassdoc (in build file:/private/tmp/typeclassdoc/)
[info] Setting version to 2.11.11
[info] Reapplying settings...
[info] Set current project to typeclassdoc (in build file:/private/tmp/typeclassdoc/)
[info] Main Scala API documentation to /private/tmp/typeclassdoc/target/scala-2.11/api...
[error] /private/tmp/typeclassdoc/MyTypeClass.scala:14: value myMethod is not a member of MyTypeClass.Ops[Int]
[error] ops.myMethod
[error] ^
[info] No documentation generated with unsuccessful compiler run
[error] one error found
[error] (compile:doc) Scaladoc generation failed
[error] Total time: 2 s, completed Jun 9, 2017 12:13:03 PM