Created
December 22, 2015 16:51
-
-
Save joune/494f7bba4c6889572bb4 to your computer and use it in GitHub Desktop.
scala/java interop AbstractMethodError
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
interface H<C> { | |
String h(C c, String... args); | |
} |
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
class Impl extends H[String] { | |
override def h(s:String, args:String*) = args.toList.mkString | |
} |
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
public class test { | |
public static void main(String[] args) throws Exception { | |
H h = new Impl(); | |
use(h); | |
} | |
public static void use(H h) { | |
out.println(h.h("a", "b", "c")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment