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
public classTest {
public scala.collection.immutable.List<java.lang.Object> foo(java.lang.Object);
public int bar(long);
public scala.collection.immutable.List<java.lang.Object> baz(java.lang.String);
public Test();
}
Note the bytecode parameter types of each method. Weird.
What's weirder is:
$ scalac -Xprint:erasure Test.scala
[[syntax trees at end of erasure]] // Test.scalapackage<empty> {
classTestextendsObject {
def<init>():Test= {
Test.super.<init>();
()
};
deffoo(t: Long):List= immutable.this.Nil;
defbar(t: Long):Int=0;
defbaz(s: String):List= immutable.this.Nil
}
}
Anyway, actually fixing this seems like it would break binary compatibility, so I don't think this can be fixed in 2.11.x.
The text was updated successfully, but these errors were encountered:
@paulp said (edited on Jul 9, 2015 8:50:30 PM UTC):
That's not the same problem. This is a fixable bug.
Play "one of these kids is not like the others" with the six bytecode signatures. That kid is the bug.
traitBippy[A]
classTest {
typeT1=LongtypeT2=Long { typeTag=Nothing }
deff1(t: T1):Bippy[Object] =???deff2(t: T2):Bippy[Object] =???defg1(t: T1):Int=???defg2(t: T2):Int=???defh1(t: T1):Object=???defh2(t: T2):Object=???// public Bippy<java.lang.Object> f1(long);// public Bippy<java.lang.Object> f2(java.lang.Object);// public int g1(long);// public int g2(long);// public java.lang.Object h1(long);// public java.lang.Object h2(long);
}
So, this is fun:
First, a test file:
Now the output of javap:
Note the bytecode parameter types of each method. Weird.
What's weirder is:
Anyway, actually fixing this seems like it would break binary compatibility, so I don't think this can be fixed in 2.11.x.
The text was updated successfully, but these errors were encountered: