Open
Description
scala code:
class A {
def f[T <: Int](x: T): T = x
}
the generic signature looks like this:
// access flags 0x1
// signature <T:Ljava/lang/Object;>(TT;)TT;
// declaration: T f<T>(T)
public f(I)I
which is invalid, java generics don't abstract over primitives. the following java code compiles:
public class B {
public static void main(String[] args) {
A a = new A();
System.out.println(a.f(10));
}
}
but fails to run
Exception in thread "main" java.lang.NoSuchMethodError: A.f(Ljava/lang/Object;)Ljava/lang/Object;
at B.main(B.java:4)