Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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