diff --git a/src/main/java/de/dhbwstuttgart/bytecode/FunNGenerator.java b/src/main/java/de/dhbwstuttgart/bytecode/FunNGenerator.java index 68784071..82c46dec 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/FunNGenerator.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/FunNGenerator.java @@ -31,7 +31,7 @@ public class FunNGenerator { private static String applyDescriptor(TargetType a) { return a.toDescriptor(); } private static String applySignature(TargetType a) { return a.toSignature(); } - private static String applyNameDescriptor(TargetType a){ return a instanceof TargetGenericType ? "LTPH;" : String.format("L%s;", applyDescriptor(a)); } + private static String applyNameDescriptor(TargetType a){ return a instanceof TargetGenericType ? "LTPH;" : String.format("L%s;", applySignature(a)); } public static byte[] generateSuperBytecode(int numberArguments) { StringBuilder superFunNClassSignature = new StringBuilder("<"); diff --git a/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java b/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java index 8d20b8f8..cfac47b8 100644 --- a/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java +++ b/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java @@ -675,6 +675,7 @@ public class ASTToTargetAST { var params = refType.getParaList().stream().map(ASTToTargetAST.this::convert).toList(); if (name.matches("Fun\\d+\\$\\$")) { // TODO This seems like a bad idea var className = FunNGenerator.getSpecializedClassName(FunNGenerator.getArguments(params), FunNGenerator.getReturnType(params)); + System.out.println(className); if (!usedFunNSuperTypes.contains(params.size())) { usedFunNSuperTypes.add(params.size()); var code = FunNGenerator.generateSuperBytecode(params.size() - 1);