Skip to content

Generating generic signatures in the presence of AnyVal is wrong #24276

@hamzaremmal

Description

@hamzaremmal

Compiler version

ce57b71

Minimized code

class Box[A](v: A) extends AnyVal
class Foo:
    def box[A]: Box[A] = ???

Output

//> javap Foo  
Compiled from "test.scala"
public class Foo {
  public Foo();
  public <A> java.lang.Object box();
}

Expectation

//> javap Foo
Compiled from "test.scala"
public class Foo {
  public <A> A box();
  public Foo();
}

Notes

First mentioned in #22140 (should be the same fix)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions