[BUG] 在 JDK27 中,通配符导入和变量使用会导致编译失败
作者: heikowulf创建于 2026年9月17日更新于 2026年9月17日
Describe the bug Using JDK 27 (both amazon corretto and oracle openJDK were tested under MacOs ARM64) Importing lombok using 'import lombok.*' and using a var statement cause the maven compiler to fail with an assertion error: java.lang.AssertionError at jdk.compiler/com.sun.tools.javac.comp.Attr.visitTree(Attr.java:5310) at jdk.compiler/com.sun.tools.javac.tree.JCTree$Visitor.visitVarType(JCTree.java:3626) at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCVarType.accept(JCTree.java:2834) at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:679) at jdk.compiler/com.sun.tools.javac.comp.Attr.attribType(Attr.java:749)
内容来源: projectlombok/lombok