Any way to share ScalaDoc @define between type and its companion?

32 views
Skip to first unread message

Alexandru Nedelcu

unread,
Oct 7, 2016, 1:54:43 AM10/7/16
to scala-user

Hello,

Is there any way to share @define macros between a type and its companion object?

/**
   * @define myDefinition hello world
   */
class MyType {
}

object MyType {
  /** $myDefinition */
  def foo: Bar
}

So how can I have a myDefinition that’s shared?
Also, any way to share these at a package level?

Thanks,


Alexandru Nedelcu
alexn.org

µ

Vlad Ureche

unread,
Oct 11, 2016, 5:52:48 PM10/11/16
to Alexandru Nedelcu, scala-user

On Fri, Oct 7, 2016 at 7:54 AM, Alexandru Nedelcu <gro...@a1.alexn.org> wrote:

Also, any way to share these at a package level?

I think the definitions in the package object should be shared.
If this is not the case, then it's a bug.

HTH,
Vlad
Reply all
Reply to author
Forward
0 new messages