Ambiguous method call false alarm with Java 8 passing functions to overloaded Scala method

Note: This issue is about Java 8 and Scala interaction, so it should not be on the Scala plugin forum.

I’m using Idea 14.1.2 build #IC-141.173 with Scala plugin version 1.4.15. Scala version is 2.11.6.

It turns out Idea mischaracterizes passing a Java 8 closure into a Scala function IF the function has two overloads, one taking a Java 8 functional interface type and the other one taking a Scala function type. This works fine with the Scala compiler without even a warning, though.

Screen Shot 2015-05-07 at 2.28.36 PM.png

This needs to work cleanly for providing APIs for both Java 8 and Scala uses. Tiny project demonstrating this issue is attached.

Thank you!


1 comment
Comment actions Permalink

I created an issue about this problem:

Best regards,
Alexander Podkhalyuzin.


Please sign in to leave a comment.