-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Description
Minimized code
package p
object A {
private[p] def m() = 1
}
Output
$ 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...