diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java index eec84a109..8e21bd7cc 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java @@ -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; diff --git a/test/plugindevelopment/TypeInsertTests/FunNInsertTest.jav b/test/plugindevelopment/TypeInsertTests/FunNInsertTest.jav index ba2dbbd99..fe76739d7 100644 --- a/test/plugindevelopment/TypeInsertTests/FunNInsertTest.jav +++ b/test/plugindevelopment/TypeInsertTests/FunNInsertTest.jav @@ -8,9 +8,6 @@ class FunNInsertTest{ var2 = b; var3 = c; }; - - - } class Object1{}