genjavadoc icon indicating copy to clipboard operation
genjavadoc copied to clipboard

Invalid code generated for classes in the empty package

Open raboof opened this issue 6 years ago • 0 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.

raboof avatar Jul 12 '19 10:07 raboof