Fehler beheben. Hat FunN den Rückgabetyp void, so wird kein ? extends void generiert

This commit is contained in:
JanUlrich 2015-02-26 16:57:43 +01:00
parent 1941fa5d64
commit 37e55490e1
2 changed files with 4 additions and 4 deletions

View File

@ -157,7 +157,10 @@ public class LambdaExpression extends Expr{
superParamTypes.add(new SuperWildcardType(pT.getOffset(), pT));
}
Type retType = method_body.getType();
ExtendsWildcardType extRetType = new ExtendsWildcardType(retType.getOffset(), retType);
Type extRetType = retType;
if(!(retType instanceof de.dhbwstuttgart.syntaxtree.type.Void)){
extRetType = new ExtendsWildcardType(retType.getOffset(), retType);
}
ret.add(new SingleConstraint(new FunN(extRetType, superParamTypes).TYPE(assumptions, this),this.getType().TYPE(assumptions, this)));
return ret;

View File

@ -8,9 +8,6 @@ class FunNInsertTest{
var2 = b;
var3 = c;
};
}
class Object1{}