forked from JavaTX/JavaCompilerCore
Fehler in SuperCall beheben. StandardKonstruktor enthält nun SuperCall
This commit is contained in:
parent
2c4f735935
commit
bfac3c8145
@ -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);
|
||||
}
|
||||
|
@ -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+")");
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user