forked from JavaTX/JavaCompilerCore
BoGTV fügt keine Constraints mehr hinzu. Test angefügt
This commit is contained in:
parent
69bd1510ec
commit
de4cfa2656
@ -91,8 +91,9 @@ public class BoundedGenericTypeVar extends GenericTypeVar
|
|||||||
if(this.bounds != null){
|
if(this.bounds != null){
|
||||||
for(Type ev : this.bounds){
|
for(Type ev : this.bounds){
|
||||||
ConstraintType extendsType = ass.getTypeFor(ev, this);
|
ConstraintType extendsType = ass.getTypeFor(ev, this);
|
||||||
//if(extendsType == null)throw new TypeinferenceException("Der Typ "+ev.getName()+" ist nicht korrekt", this);
|
if(extendsType == null)throw new TypeinferenceException("Der Typ "+ev.getName()+" ist nicht korrekt", this);
|
||||||
ret.add(new SingleConstraint(ass.getTypeFor(this, this), extendsType ));
|
|
||||||
|
//ret.add(new SingleConstraint(ass.getTypeFor(this, this), extendsType ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
class GenericTest{
|
||||||
|
<A extends Integer> A method(){
|
||||||
|
A x;
|
||||||
|
Integer integer;
|
||||||
|
x = integer;
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
}
|
16
test/plugindevelopment/TypeInsertTests/GenericVarTest3.java
Normal file
16
test/plugindevelopment/TypeInsertTests/GenericVarTest3.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user