diff --git a/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java b/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java index 30d76167..cbbd9227 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java @@ -666,8 +666,11 @@ public class TYPEStmt implements StatementVisitor{ protected Constraint generateConstructorConstraint(NewClass forConstructor, MethodAssumption assumption, TypeInferenceBlockInformation info, GenericsResolver resolver){ Constraint methodConstraint = new Constraint(); + //WELCHEN SINN MACHT DIESER CONSTRAINT??? + //Ist er nicht immer classname <. classname und damit redundant? methodConstraint.add(new Pair(assumption.getReturnType(resolver), forConstructor.getType(), PairOperator.SMALLERDOT)); + //WELCHEN SINN MACHT DIESER CONSTRAINT??? methodConstraint.addAll(generateParameterConstraints(forConstructor, assumption, info, resolver)); return methodConstraint; } diff --git a/src/test/resources/bytecode/javFiles/OL.jav b/src/test/resources/bytecode/javFiles/OL.jav index 01a353fd..4eab848f 100644 --- a/src/test/resources/bytecode/javFiles/OL.jav +++ b/src/test/resources/bytecode/javFiles/OL.jav @@ -7,9 +7,10 @@ import java.lang.Boolean; public class OL { - m(x) { return x + x; } - - m(Boolean x) { return x; } + java.lang.Double m(java.lang.Double x) { return x + x; } + java.lang.Integer m(java.lang.Integer x) { return x + x; } + java.lang.String m(java.lang.String x) { return x + x; } + java.lang.Boolean m(Boolean x) { return x; } // if the class contains just this method, then correct BC will be generated. // But if another methods are contained then the generated BC is not correct