Search code examples
intellij-ideajava-8functional-interface

Idea doesn't show error message if functional interface has multiple non default methods


I use idea 12.
And see following result after compilation. enter image description here

I am wondering that idea doesn't show error in text editor.

Is it idea bug?


Solution

  • I'm not sure what kind of support IntelliJ IDEA 12 has for Java 8 inspections and code analysis, but in IntelliJ 14 this works fine. However the error is displayed only if you have Project language level set to 8 in Project structure (which makes sense).

    So try changing the language level if you haven't done so already. If that doesn't help then it's possible that IntelliJ 12 doesn't support this.