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
$ echo 'package p; object A { private[p] def m() = 1 }' > A.scala && scalac3 A.scala && javap -p p.A p.A$
Compiled from "A.scala"
public final class p.A {
public static int m();
}
Compiled from "A.scala"
public final class p.A$ implements java.io.Serializable {
public static final p.A$ MODULE$;
private p.A$();
public static {};
private java.lang.Object writeReplace();
public int m();
}
Expectation
$ echo 'package p; object A { private[p] def m() = 1 }' > A.scala && scalac A.scala && javap -p p.A p.A$
Compiled from "A.scala"
public final class p.A {
}
Compiled from "A.scala"
public final class p.A$ {
public static final p.A$ MODULE$;
public static {};
public int m();
private p.A$();
}
I'm not sure about the criticality of this. It's within the subset of java interop, but it's also related to what/how bytecode is emitted...
The text was updated successfully, but these errors were encountered:
Just encountered this in typelevel/cats#4181, since we need to add Scala 3 specific MiMa filters to account for these which is less than ideal.
I suppose it's too late to change this now, due to backwards bincompat constraints?
FWIW, this "bug" becomes a "feature" when you change a public method to a package-private, since in those cases you don't want to break binary compatibility (although we often eat it since it's Java-only). However, this is annoying when the method was intended to be a packate-private internal all along.
On second thought, actually I think this is a good thing at least from a bincompat POV. Hopefully MiMa can learn to automatically filter these when they are package private, and then its no hassle at all.
Minimized code
Output
Expectation
I'm not sure about the criticality of this. It's within the subset of java interop, but it's also related to what/how bytecode is emitted...
The text was updated successfully, but these errors were encountered: