Last active
August 29, 2015 14:10
-
-
Save lrytz/64141a5af3ad116a6854 to your computer and use it in GitHub Desktop.
This file contains 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
lucmac:sandbox luc$ cat Test.java | |
public interface Test { | |
default int foo() { return 1; } | |
int bar(); | |
} | |
lucmac:sandbox luc$ javac Test.java | |
lucmac:sandbox luc$ scala | |
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0 | |
Welcome to Scala version 2.11.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> class A extends Test { def bar() = super.foo() } | |
defined class A | |
scala> :javap A | |
public int bar(); | |
descriptor: ()I | |
flags: ACC_PUBLIC | |
Code: | |
stack=1, locals=1, args_size=1 | |
0: aload_0 | |
1: invokespecial #12 // Method Test.foo:()I | |
4: ireturn | |
LocalVariableTable: | |
Start Length Slot Name Signature | |
0 5 0 this LA; | |
LineNumberTable: | |
line 7: 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment