From https://bugs.eclipse.org/562845
The following check in AstConverter is obsolete (last line of the snippet):
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration declaration = types[i];
if (CharOperation.equals(declaration.name, TypeConstants.PACKAGE_INFO_NAME)) {
continue;
}
ASTNode type = convert(declaration);
if (type == null) {
compilationUnit.setFlags(compilationUnit.getFlags() | ASTNode.MALFORMED);
} else {
if (type instanceof ModuleDeclaration)
...
Converting an ast.TypeDeclaration produces a TypeDeclaration, which can never be a ModuleDeclaration.
From https://bugs.eclipse.org/562845
The following check in AstConverter is obsolete (last line of the snippet):
Converting an
ast.TypeDeclarationproduces aTypeDeclaration, which can never be aModuleDeclaration.