Bugfix: OverloadingTest

This commit is contained in:
Enrico Schrödter 2016-05-03 18:15:14 +02:00
parent db93a1dfe1
commit ae01af7a40
4 changed files with 8 additions and 15 deletions

View File

@ -79,14 +79,11 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable
protected static Logger inferencelog = Logger.getLogger("inference"); protected static Logger inferencelog = Logger.getLogger("inference");
protected static Logger parserlog = Logger.getLogger("parser"); protected static Logger parserlog = Logger.getLogger("parser");
protected Menge<org.apache.commons.bcel6.generic.Type[]> createdMethods = new Menge<>();
public Method(int offset) { public Method(int offset) {
super(offset); super(offset);
} }
public Method(String name, Type returnType, ParameterList parameterList, public Method(String name, Type returnType, ParameterList parameterList, Block block, GenericDeclarationList gtvDeclarations, int offset) {
Block block, GenericDeclarationList gtvDeclarations, int offset) {
this(offset); this(offset);
/* /*
* if(parameterList != null)parameterList.parserPostProcessing(this); * if(parameterList != null)parameterList.parserPostProcessing(this);

View File

@ -602,17 +602,18 @@ public class RefType extends ObjectType implements IMatchable
sb.append(((RefType) type).getCombinedType(cg, rs).replace(".", "%")); sb.append(((RefType) type).getCombinedType(cg, rs).replace(".", "%"));
}else if(type instanceof TypePlaceholder){ }else if(type instanceof TypePlaceholder){
sb.append(((TypePlaceholder) type).getBytecodeType(cg, rs).toString().replace(".", "%")); sb.append(((TypePlaceholder) type).getBytecodeType(cg, rs).toString().replace(".", "%"));
}else if(type instanceof WildcardType){
return this.getName().toString();
}else{ }else{
sb.append(type.getBytecodeType(cg, rs).toString().replace(".", "%")); sb.append(type.getBytecodeType(cg, rs).toString().replace(".", "%"));
} }
sb.append("%"); sb.append("%");
} }
}else{ return sb.toString();
sb.append(this.getName().toString());
} }
return sb.toString(); return sb.append(this.getName().toString()).toString();
} }
public GenericClassType getGenericClassType(){ public GenericClassType getGenericClassType(){

View File

@ -17,11 +17,6 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions;
import de.dhbwstuttgart.typeinference.exceptions.DebugException; import de.dhbwstuttgart.typeinference.exceptions.DebugException;
import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException; import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException;
class Test {
void methode(ArrayList<? super Integer> t){
}
}
//TODO: Die Klasse Type muss abstract werden! //TODO: Die Klasse Type muss abstract werden!
// ino.class.Type.26716.declaration // ino.class.Type.26716.declaration

View File

@ -1,6 +1,6 @@
class OL { class OL {
m(x) { return x + x; } m(x) { return x + x; }
Boolean m(Boolean x) {return x; } m(Boolean x) {return x; }
} }