Skip to content

Bug 562845 - remove left over code from times when ModuleDeclaration was a subtype of TypeDeclaration #2639

Description

@stephan-herrmann

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions