lightbend / genjavadoc

A compiler plugin for generating doc’able Java source from Scala source

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid code generated for classes in the empty package

raboof opened this issue · comments

https://github.com/GeTOUO/genjavadoc-error-demo at 3c6d2fae3229ca7b84fc21345e8dd6241b27a1d2

/**
  * test model
  * @param field some field des
  */
case class ScalaModel(field: String)

produced alongside the ScalaModel also a ScalaModel$:

public  class ScalaModel$ extends scala.runtime.AbstractFunction1<java.lang.String, <empty>.ScalaModel> implements scala.Serializable {
  /**
   * Static reference to the singleton instance of this Scala object.
   */
  public static final ScalaModel$ MODULE$ = null;
  public   ScalaModel$ ()  { throw new RuntimeException(); }
}

Here the 'empty' package makes it into the generic type, which is of course invalid.