semanticServices.getErrorHandler().genericError(anonymousInitializer.getNode(),"Anonymous initializers are only allowed in the presence of a primary constructor");
semanticServices.getErrorHandler().genericError(declaration.getNameNode(),"A secondary constructor may appear only in a class that has a primary constructor");
}
else{
...
...
@@ -444,6 +471,15 @@ public class TopDownAnalyzer {