intellij-idealambdadiamond-operator

IntelliJ - Diamond types and Lambda expressions are not supported at language level 5


Recently IntelliJ has been giving me an error regarding the use of both lambda expressions and diamond types.

The error I get is Lambda expressions are not supported at language level '5'

I checked my project structure and it shows my language level is set to 8.

enter image description here

Thanks for your time.


Solution

  • Check the language settings of the module. It is possible for modules to have a different language setting than the project. This makes it possible for different parts of the project to use different language levels.