Created
September 27, 2010 12:48
-
-
Save kmizu/598966 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>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 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object K { | |
def main(args: Array[String]) { | |
println(X.N) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object X { | |
final val N = 100 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment