Skip to content

Invalid java Code for a case class (JDK 11) #215

@ignasi35

Description

@ignasi35

When running in JDK 11, given:

final case class CommandEnvelope(entityId: String, payload: Any)

the output is:

public final class CommandEnvelope implements scala.Product, scala.Serializable {
  static public abstract  R apply (T1 v1, T2 v2)  ;
  static public  java.lang.String toString ()  { throw new RuntimeException(); }
  public  java.lang.String entityId ()  { throw new RuntimeException(); }
  public  Object payload ()  { throw new RuntimeException(); }
  // not preceding
  public   CommandEnvelope (java.lang.String entityId, Object payload)  { throw new RuntimeException(); }
}

This produces multiple errors in apply():

  1. T1, T2 and R are undefined
  2. static abstract is an invalid combination of modifiers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions