This commit is contained in:
Fayez Abu Alia 2018-12-20 10:25:55 +01:00
parent 5a3145281e
commit 85fcef8289
2 changed files with 10 additions and 2 deletions

View File

@ -272,7 +272,8 @@ public class BytecodeGen implements ASTVisitor {
for(String paramName : methodParamsAndTypes.keySet()) { for(String paramName : methodParamsAndTypes.keySet()) {
String typeOfParam = methodParamsAndTypes.get(paramName).acceptTV(new TypeToSignature()); String typeOfParam = methodParamsAndTypes.get(paramName).acceptTV(new TypeToSignature());
if(genericsAndBounds.containsKey(typeOfParam) ||typeOfParam.substring(0, 4).equals("TPH ") System.out.println(typeOfParam);
if(genericsAndBounds.containsKey(typeOfParam) ||typeOfParam.contains("$")
|| typeOfParam.contains("<")) { || typeOfParam.contains("<")) {
hasGen = true; hasGen = true;
break; break;

View File

@ -106,7 +106,14 @@ public class DescriptorToString implements DescriptorVisitor{
if(constructor.getGenericsAndBounds().containsKey(fpDesc)){ if(constructor.getGenericsAndBounds().containsKey(fpDesc)){
desc += "L"+constructor.getGenericsAndBounds().get(fpDesc)+ ";"; desc += "L"+constructor.getGenericsAndBounds().get(fpDesc)+ ";";
}else { }else {
desc += "L"+resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor())+ ";"; // desc += "L"+resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor())+ ";";
String resType = resultSet.resolveType(fp.getType()).resolvedType.acceptTV(new TypeToDescriptor());
if(resType.subSequence(0, 4).equals("TPH ")) {
// Bound ist immer Object
desc += "L"+Type.getInternalName(Object.class)+ ";";
} else {
desc += "L"+resType+ ";";
}
} }
}else { }else {
// System.out.println("Cons has NO Gens"); // System.out.println("Cons has NO Gens");