forked from JavaTX/JavaCompilerCore
Fix FunNGenerator
This commit is contained in:
parent
8806d1462c
commit
b63d1bcf73
@ -71,13 +71,14 @@ public class FunNGenerator {
|
||||
for (TargetType typeArgument : parameters) {
|
||||
//ToDo Etienne: Refactor
|
||||
if (typeArgument instanceof TargetGenericType generic){
|
||||
if(genericSignature.contains(generic.name())) continue;
|
||||
//if(genericSignature.contains(generic.name())) continue;
|
||||
genericSignature += String.format("%s:%s", generic.name(), applyDescriptor(generic));
|
||||
containsGeneric = true;
|
||||
}
|
||||
}
|
||||
genericSignature += ">";
|
||||
if (containsGeneric) funNClassSignature.insert(0, genericSignature);
|
||||
System.out.println(funNClassSignature.toString());
|
||||
|
||||
ClassWriter classWriter = new ClassWriter(0);
|
||||
classWriter.visit(bytecodeVersion, ACC_PUBLIC | ACC_ABSTRACT | ACC_INTERFACE, getSpecializedClassName(argumentTypes, returnType), funNClassSignature.toString(), objectSuperType, new String[]{getSuperClassName(argumentTypes.size())});
|
||||
|
@ -675,7 +675,6 @@ 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);
|
||||
|
Loading…
Reference in New Issue
Block a user