Fehler in SuperCall beheben. StandardKonstruktor enthält nun SuperCall

This commit is contained in:
JanUlrich 2015-06-17 11:08:50 +02:00
parent 2c4f735935
commit bfac3c8145
2 changed files with 5 additions and 3 deletions

View File

@ -1250,8 +1250,8 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
if(!constructorVorhanden){//Falls kein Konstruktor vorhanden ist, muss noch der Standardkonstruktor angefügt werden:
Block konstruktorBlock = new Block();
konstruktorBlock.statements.add(new SuperCall(konstruktorBlock));
//Constructor standardKonstruktor = new Constructor(Method.createEmptyMethod(konstruktorBlock,this.getName().toString(), this));
Constructor standardKonstruktor = new Constructor(Method.createEmptyMethod(this.getName().toString(), this));
Constructor standardKonstruktor = new Constructor(Method.createEmptyMethod(konstruktorBlock,this.getName().toString(), this));
//Constructor standardKonstruktor = new Constructor(Method.createEmptyMethod(this.getName().toString(), this));
this.addField(standardKonstruktor);
}

View File

@ -76,7 +76,9 @@ public class SuperCall extends ThisCall
@Override
public JavaCodeResult printJavaCode(ResultSet resultSet) {
return new JavaCodeResult("super("+this.getArgumentList().printJavaCode(resultSet)+")");
String argList = "";
if(this.getArgumentList() != null)argList = this.getArgumentList().printJavaCode(resultSet).getJavaCode();
return new JavaCodeResult("super("+argList+")");
}
}