diff --git a/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java b/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java index 8fcebbf0..5cbcfca9 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java @@ -831,8 +831,10 @@ public class BytecodeGenMethod implements StatementVisitor { //ToDo Etienne: Double Check RefTypeOrTPHOrWildcardOrGeneric returnType = resolver.resolve(methodCall.getType()); List argumentTypes = methodCall - .argTypes + .arglist + .getArguments() .stream() + .map(TypableStatement::getType) .map(resolver::resolve) .collect(Collectors.toList()); FunNUtilities funNUtilities = FunNGenerator.getInstance(); diff --git a/src/main/java/de/dhbwstuttgart/bytecode/funN/FunNGenerator.java b/src/main/java/de/dhbwstuttgart/bytecode/funN/FunNGenerator.java index 46e219aa..8bd512b8 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/funN/FunNGenerator.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/funN/FunNGenerator.java @@ -82,7 +82,7 @@ public class FunNGenerator implements FunNUtilities{ .concat(argumentTypes.stream(), Stream.of(returnType)) .collect(Collectors.toList()); RefType superFunN = new RefType(new JavaClassName(getSuperClassName(argumentTypes.size())), parameters , null); - StringBuilder funNClassSignature = new StringBuilder(objectSignature + (superFunN.acceptTV(new TypeToSignature()))); + StringBuilder funNClassSignature = new StringBuilder(objectSignature + (superFunN.acceptTV(new TypeToSignature(false)))); boolean containsGeneric = false; String genericSignature = "<"; diff --git a/src/main/java/de/dhbwstuttgart/bytecode/signature/TypeToSignature.java b/src/main/java/de/dhbwstuttgart/bytecode/signature/TypeToSignature.java index 8e5a87dd..0026b85f 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/signature/TypeToSignature.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/signature/TypeToSignature.java @@ -19,7 +19,7 @@ import de.dhbwstuttgart.syntaxtree.type.TypeVisitor; public class TypeToSignature implements TypeVisitor { private List constraints; - private final boolean superFunN; + private final boolean specializedFunN; public TypeToSignature() { this(new ArrayList<>(), true); } @@ -29,16 +29,16 @@ public class TypeToSignature implements TypeVisitor { this(constraints, true); } - public TypeToSignature(List constraints, boolean superFunN){ + public TypeToSignature(List constraints, boolean specializedFunN){ this.constraints = constraints; - this.superFunN = superFunN; + this.specializedFunN = specializedFunN; } @Override public String visit(RefType refType) { if(refType.getName().toString().equals("void")) return "V"; - if (refType.getName().toString().matches("Fun\\d+\\$\\$") && !superFunN){ + if (refType.getName().toString().matches("Fun\\d+\\$\\$") && specializedFunN){ FunNUtilities funNUtilities = FunNGenerator.getInstance(); return funNUtilities.getSpecializedSignature(funNUtilities.getArguments(refType.getParaList()), funNUtilities.getReturnType(refType.getParaList())); }