BoGTV fügt keine Constraints mehr hinzu. Test angefügt

This commit is contained in:
JanUlrich 2015-02-03 11:20:05 +01:00
parent 69bd1510ec
commit de4cfa2656
3 changed files with 27 additions and 2 deletions

View File

@ -91,8 +91,9 @@ public class BoundedGenericTypeVar extends GenericTypeVar
if(this.bounds != null){
for(Type ev : this.bounds){
ConstraintType extendsType = ass.getTypeFor(ev, this);
//if(extendsType == null)throw new TypeinferenceException("Der Typ "+ev.getName()+" ist nicht korrekt", this);
ret.add(new SingleConstraint(ass.getTypeFor(this, this), extendsType ));
if(extendsType == null)throw new TypeinferenceException("Der Typ "+ev.getName()+" ist nicht korrekt", this);
//ret.add(new SingleConstraint(ass.getTypeFor(this, this), extendsType ));
}
}
return ret;

View File

@ -0,0 +1,8 @@
class GenericTest{
<A extends Integer> A method(){
A x;
Integer integer;
x = integer;
return x;
}
}

View File

@ -0,0 +1,16 @@
package plugindevelopment.TypeInsertTests;
import java.util.Vector;
import org.junit.Test;
public class GenericVarTest3 {
private static final String TEST_FILE = "GenericVarTest3.jav";
@Test
public void run(){
Vector<String> mustContain = new Vector<String>();
//mustContain.add("Fun1<Fun1<Fun1<void, Object3>, Object2>, Object1> op");
MultipleTypesInsertTester.test(this.TEST_FILE, mustContain);
}
}