From 7a9c0a1e69df380e14075f54c6688e7e3390bafc Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 21 Mar 2018 11:09:29 +0100 Subject: [PATCH 1/2] LambdaRunnableTest fix --- test/javFiles/LambdaRunnable.jav | 3 +++ test/visualisation/ToString.java | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 test/visualisation/ToString.java diff --git a/test/javFiles/LambdaRunnable.jav b/test/javFiles/LambdaRunnable.jav index 982680c3..37924ea2 100644 --- a/test/javFiles/LambdaRunnable.jav +++ b/test/javFiles/LambdaRunnable.jav @@ -1,3 +1,6 @@ +import java.lang.Runnable; +import java.lang.String; +import java.lang.System; public class LamRunnable{ diff --git a/test/visualisation/ToString.java b/test/visualisation/ToString.java new file mode 100644 index 00000000..00b8ddea --- /dev/null +++ b/test/visualisation/ToString.java @@ -0,0 +1,5 @@ +package visualisation; + +public class ToString { + +} From e1f579664a367978b10566465c3999afc87323c8 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 21 Mar 2018 11:12:06 +0100 Subject: [PATCH 2/2] Fix Generics in MethodCall --- src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java b/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java index 8d87218d..0cadc085 100644 --- a/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java +++ b/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java @@ -349,7 +349,7 @@ public class TYPEStmt implements StatementVisitor{ */ methodConstraint.add(new Pair(forMethod.receiver.getType(), assumption.getReceiverType(resolver), PairOperator.SMALLERDOT)); - methodConstraint.add(new Pair(assumption.getReturnType(), forMethod.getType(), + methodConstraint.add(new Pair(assumption.getReturnType(resolver), forMethod.getType(), PairOperator.EQUALSDOT)); methodConstraint.addAll(generateParameterConstraints(forMethod, assumption, info, resolver)); return methodConstraint; @@ -442,7 +442,7 @@ public class TYPEStmt implements StatementVisitor{ protected Constraint generateConstructorConstraint(NewClass forConstructor, MethodAssumption assumption, TypeInferenceBlockInformation info, GenericsResolver resolver){ Constraint methodConstraint = new Constraint(); - methodConstraint.add(new Pair(assumption.getReturnType(), forConstructor.getType(), + methodConstraint.add(new Pair(assumption.getReturnType(resolver), forConstructor.getType(), PairOperator.SMALLERDOT)); methodConstraint.addAll(generateParameterConstraints(forConstructor, assumption, info, resolver)); return methodConstraint;