Skip to content

Refinement creates raw type in Java generic signature #12199

Open
@bishabosha

Description

@bishabosha

Compiler version

If you're not sure what version you're using, run print scalaVersion from sbt
(if you're running scalac manually, use scalac -version instead).

Minimized code

package dottyErasure

trait B
trait Cov[+T]

class Z {
  def cov_125(x: Cov[B]): Unit = {}
  def cov_126(x: Cov[B] { type X }): Unit = {}
}

Output

// javap dottyErasure.Z
public class dottyErasure.Z {
  public dottyErasure.Z();
  public void cov_125(dottyErasure.Cov<tastytest.dottyErasure.B>);
  public void cov_126(dottyErasure.Cov);
}

Expectation

both signatures to be the same, unless this is expected as they are not the same type?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions