Skip to content

Instantly share code, notes, and snippets.

@kmizu
Created September 27, 2010 12:48
Show Gist options
  • Save kmizu/598966 to your computer and use it in GitHub Desktop.
Save kmizu/598966 to your computer and use it in GitHub Desktop.
>javap -c K$
Compiled from "K.scala"
public final class K$ extends java.lang.Object implements scala.ScalaObject{
public static final K$ MODULE$;
public static {};
Code:
0: new #9; //class K$
3: invokespecial #12; //Method "<init>":()V
6: return
public void main(java.lang.String[]);
Code:
0: getstatic #19; //Field scala/Predef$.MODULE$:Lscala/Predef$;
3: ldc #21; //int 100 // *here*
5: invokestatic #27; //Method scala/runtime/BoxesRunTime.boxToInteger:(I)Ljava/lang/Integer;
8: invokevirtual #31; //Method scala/Predef$.println:(Ljava/lang/Object;)V
11: return
}
object K {
def main(args: Array[String]) {
println(X.N)
}
}
object X {
final val N = 100
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment