Idea中JDK为1.8,还提示Diamond types are not supported at this language level

project的java level 已经核实确实为8,但是IDEA里面仍然会有如下图的提示:

Idea中JDK为1.8,还提示Diamond types are not supported at this language level_第1张图片

通过查看项目设置,发现project的java level 也是8。

Idea中JDK为1.8,还提示Diamond types are not supported at this language level_第2张图片
然后继续检查其他模块 如modules ,发现了问题所在。

改为8就好了。

Idea中JDK为1.8,还提示Diamond types are not supported at this language level_第3张图片

遇到类似问题重点排查的位置:
project structure中的project,module中的sources和setting中的java compiler

--------------------- 
作者:明明如月小角落 
来源:CSDN 
原文:https://blog.csdn.net/w605283073/article/details/79980175 
版权声明:本文为博主原创文章,转载请附上博文链接!

你可能感兴趣的:(java,idea,java,idea,下划线报错)