From 37e55490e1c715fbc5bedf6a0b18341b84f9389a Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 26 Feb 2015 16:57:43 +0100 Subject: [PATCH] =?UTF-8?q?Fehler=20beheben.=20Hat=20FunN=20den=20R=C3=BCc?= =?UTF-8?q?kgabetyp=20void,=20so=20wird=20kein=20=3F=20extends=20void=20ge?= =?UTF-8?q?neriert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dhbwstuttgart/syntaxtree/statement/LambdaExpression.java | 5 ++++- test/plugindevelopment/TypeInsertTests/FunNInsertTest.jav | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java b/src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java index eec84a10..8e21bd7c 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 ba2dbbd9..fe76739d 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{}