-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Description
Compiler version
Minimized code
final class Box[A](value: A) extends AnyVal
trait Foo:
def foo[A](a: A): Box[A] = Box(a)
object bar extends FooOutput
//> javap bar\$
Compiled from "test.scala"
public final class bar$ implements Foo,java.io.Serializable {
public static final bar$ MODULE$;
public static {};
public java.lang.Object foo(java.lang.Object);
}Expectation
//> javap bar\$
Compiled from "test.scala"
public final class bar$ implements Foo,java.io.Serializable {
public static final bar$ MODULE$;
public static {};
public <A> A foo(A);
}Notes
- The static forwarder has a (correct?) generic signature:
//> javap bar
Compiled from "test.scala"
public final class bar {
public static <A> java.lang.Object foo(A);
}- The issue arise because the comparaison here fails with
(a: Object): ErasedValueType(Box, Object) =:= (a: Object): Object.
if TypeErasure.transformInfo(target, infoBeforeErasure) =:= sym.info then