Commit 8014156f authored by Jesper Öqvist's avatar Jesper Öqvist
Browse files

Improved name checking error messages for TypeDecl

parent 4a525b62
2013-01-23 Jesper Öqvist <jesper.oqvist@cs.lth.se>
* Moved PathPart and subclasses to separate .jadd file in Java1.4Frontend
* Improved name checking error messages for TypeDecl
2013-01-10 Jesper Öqvist <jesper.oqvist@cs.lth.se>
......
......@@ -250,7 +250,7 @@ aspect NameCheck {
public void TypeDecl.nameCheck() {
if(isTopLevelType() && lookupType(packageName(), name()) != this)
error("duplicate member " + name() + " in compilation unit");
error("duplicate type " + name() + " in package " + packageName());
if(!isTopLevelType() && !isAnonymous() && !isLocalClass() && extractSingleType(enclosingType().memberTypes(name())) != this)
error("duplicate member type " + name() + " in type " + enclosingType().typeName());
......@@ -263,7 +263,7 @@ aspect NameCheck {
}
if(!packageName().equals("") && hasPackage(fullName()))
error("duplicate member class and package " + name());
error("type name conflicts with a package using the same name: " + name());
// 8.1 & 9.1
if(hasEnclosingTypeDecl(name())) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment