Skip to content
Snippets Groups Projects
Commit 94be58ca authored by Sven Gestegård Robertz's avatar Sven Gestegård Robertz
Browse files

Added checking that TypeDefs do not have intentions to compiler

parent f385f5d7
No related branches found
No related tags found
No related merge requests found
......@@ -27,5 +27,4 @@ aspect ErrorCheck {
getChild(i).errorCheck(collection);
}
}
}
......@@ -34,3 +34,18 @@ aspect TypeCheck {
}
}
}
aspect AnnotationCheck {
refine TypeCheck void ASTNode.typeCheck() {
refined(); // similar to call to super
annotationCheck();
}
public void ASTNode.annotationCheck() {}
public void TypeDecl.annotationCheck() {
if(getTypeInstance().hasIntentions()) {
error("TypeDecl " + getName() + " has intentions. (Not allowed for typedefs)");
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment