From a26f4664719b17d16fda7bca36898b024fcdf2d8 Mon Sep 17 00:00:00 2001 From: Victorious3 Date: Tue, 24 Jan 2023 12:16:34 +0100 Subject: [PATCH] Fix --- .../java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java | 4 ++-- .../target/generate/StatementToTargetExpression.java | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java b/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java index 84f81958..cb263f63 100644 --- a/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java +++ b/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java @@ -194,7 +194,7 @@ public class ASTToTargetAST { superType = methodCall.receiverType; methodCall.receiver.accept(this); for(int i = 0;i> input) { - eliminateCycles(input); + //eliminateCycles(input); eliminateInfima(input); } diff --git a/src/main/java/de/dhbwstuttgart/target/generate/StatementToTargetExpression.java b/src/main/java/de/dhbwstuttgart/target/generate/StatementToTargetExpression.java index 680a2140..a1ed570e 100644 --- a/src/main/java/de/dhbwstuttgart/target/generate/StatementToTargetExpression.java +++ b/src/main/java/de/dhbwstuttgart/target/generate/StatementToTargetExpression.java @@ -306,9 +306,11 @@ public class StatementToTargetExpression implements StatementVisitor { public void visit(SuperCall superCall) { var aSuper = converter.convert(converter.currentClass.getSuperClass()); var type = converter.convert(superCall.getType()); + var parameters = superCall.signature.stream().map(converter::convert).toList(); + parameters = parameters.subList(0, parameters.size() - 1); result = new TargetMethodCall( type, type, - superCall.argTypes == null ? List.of() : superCall.argTypes.stream().map(converter::convert).toList(), + parameters, new TargetSuper(aSuper), superCall.getArgumentList().getArguments().stream().map(converter::convert).toList(), aSuper,