From fc6040da39367f7d629ba0602a92af305294d114 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Fri, 30 Jun 2017 13:48:59 +0200 Subject: [PATCH] Fehler in TYPE beseitigen --- src/de/dhbwstuttgart/typeinference/typeAlgo/TYPE.java | 6 +++--- test/javFiles/mathStruc.jav | 2 +- test/typeinference/JavaTXCompilerTest.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPE.java b/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPE.java index a799d8e2..ccb70002 100644 --- a/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPE.java +++ b/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPE.java @@ -221,7 +221,7 @@ public class TYPE implements StatementVisitor{ protected Constraint generateConstraint(MethodCall forMethod, MethodAssumption assumption, TypeInferenceBlockInformation info){ Constraint methodConstraint = new Constraint(); methodConstraint.add(ConstraintsFactory.createPair(forMethod.receiver.getType(), assumption.getReceiverType(), PairOperator.SMALLERDOT, info)); - methodConstraint.add(ConstraintsFactory.createPair(assumption.getReturnType(), forMethod.getType(), PairOperator.SMALLERDOT, info)); + methodConstraint.add(ConstraintsFactory.createPair(assumption.getReturnType(), forMethod.getType(), PairOperator.EQUALSDOT, info)); methodConstraint.addAll(generateParameterConstraints(forMethod, assumption, info)); return methodConstraint; } @@ -229,8 +229,8 @@ public class TYPE implements StatementVisitor{ protected Set generateParameterConstraints(MethodCall foMethod, MethodAssumption assumption, TypeInferenceBlockInformation info) { Set ret = new HashSet<>(); for(int i = 0;i { -mathStruc(A a) { ;} +mathStruc(A a) { } A model(){ A a; return a; } diff --git a/test/typeinference/JavaTXCompilerTest.java b/test/typeinference/JavaTXCompilerTest.java index 1a02861c..696a56d4 100644 --- a/test/typeinference/JavaTXCompilerTest.java +++ b/test/typeinference/JavaTXCompilerTest.java @@ -30,8 +30,8 @@ public class JavaTXCompilerTest extends JavaTXCompiler { @Test public void test() throws IOException, ClassNotFoundException { - //filesToTest.add(new File(rootDirectory+"Faculty.jav")); - filesToTest.add(new File(rootDirectory+"mathStruc.jav")); + filesToTest.add(new File(rootDirectory+"Faculty.jav")); + //filesToTest.add(new File(rootDirectory+"mathStruc.jav")); //filesToTest.add(new File(rootDirectory+"Lambda.jav")); //filesToTest.add(new File(rootDirectory+"Lambda2.jav")); //filesToTest.add(new File(rootDirectory+"Lambda3.jav"));