Community
Participate
Working Groups
The error "The type {0} collides with a package" is not detected at the root of the package hierarchy, ie., the compiler accepts a toplevel package and a type in the default package having the same name. Fix: add to the front of org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createPackage something like: if (compoundName.length == 1) if (defaultPackage.getType0(compoundName[0])!= null) return null; The message will be produced at the calling site.
Types in the default package are special. They are only visible to other types in the default package. Check with javac - they do not report collisions either.