You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fukaeri:~ dlwh$ cat x.scala
@SerialVersionUID(1L)
class Foo[@specialized(Int) T](x: Int) extends Serializable
fukaeri:~ dlwh$ javap -private Foo\$mcI\$sp.class
Compiled from "x.scala"
public class Foo$mcI$sp extends Foo<java.lang.Object> {
private final int x;
public Foo$mcI$sp(int);
}
fukaeri:~ dlwh$ javap -private Foo.class
Compiled from "x.scala"
public class Foo<T> implements scala.Serializable {
public static final long serialVersionUID;
public Foo(int);
}
2.11;
fukaeri:~ dlwh$ javap -private Foo.class
Compiled from "x.scala"
public class Foo implements scala.Serializable {
public final T x;
public T x();
public int x$mcI$sp();
public boolean specInstance$();
public Foo(T);
}
fukaeri:~ dlwh$ javap -private Foo
Foo$mcI$sp.class Foo.class
fukaeri:~ dlwh$ javap -private Foo$mcI$sp.class
Compiled from "x.scala"
public class Foo$mcI$sp extends Foo<java.lang.Object> {
public final int x$mcI$sp;
public int x$mcI$sp();
public int x();
public boolean specInstance$();
public java.lang.Object x();
public Foo$mcI$sp(int);
}
2.11:
fukaeri:~ dlwh$ javap -private Foo\$mcI\$sp.class
Compiled from "x.scala"
public class Foo$mcI$sp extends Foo<java.lang.Object> {
private final int x;
public Foo$mcI$sp(int);
}
fukaeri:~ dlwh$ javap -private Foo.class
Compiled from "x.scala"
public class Foo<T> implements scala.Serializable {
public Foo(int);
}
(also, the "private final int x" should probably not be there...)
The text was updated successfully, but these errors were encountered:
@dlwh said:
Thanks for getting to it so quickly! Yeah, I also had thought that Java was supposed to look at the base class... but I lost the results of a 24-hour experiment to it. So... :-)
2.10:
2.11;
fukaeri:~ dlwh$ javap -private Foo.class
Compiled from "x.scala"
public class Foo implements scala.Serializable {
public final T x;
public T x();
public int x$mcI$sp();
public boolean specInstance$();
public Foo(T);
}
fukaeri:~ dlwh$ javap -private Foo
Foo$mcI$sp.class Foo.class
fukaeri:~ dlwh$ javap -private Foo$mcI$sp.class
Compiled from "x.scala"
public class Foo$mcI$sp extends Foo<java.lang.Object> {
public final int x$mcI$sp;
public int x$mcI$sp();
public int x();
public boolean specInstance$();
public java.lang.Object x();
public Foo$mcI$sp(int);
}
2.11:
(also, the "private final int x" should probably not be there...)
The text was updated successfully, but these errors were encountered: