forked from JavaTX/JavaCompilerCore
modified: src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
modified: src/test/resources/bytecode/javFiles/OL.jav
This commit is contained in:
parent
09a6aec65d
commit
4391adfb0f
@ -666,8 +666,11 @@ public class TYPEStmt implements StatementVisitor{
|
|||||||
protected Constraint<Pair> generateConstructorConstraint(NewClass forConstructor, MethodAssumption assumption,
|
protected Constraint<Pair> generateConstructorConstraint(NewClass forConstructor, MethodAssumption assumption,
|
||||||
TypeInferenceBlockInformation info, GenericsResolver resolver){
|
TypeInferenceBlockInformation info, GenericsResolver resolver){
|
||||||
Constraint methodConstraint = new Constraint();
|
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(),
|
methodConstraint.add(new Pair(assumption.getReturnType(resolver), forConstructor.getType(),
|
||||||
PairOperator.SMALLERDOT));
|
PairOperator.SMALLERDOT));
|
||||||
|
//WELCHEN SINN MACHT DIESER CONSTRAINT???
|
||||||
methodConstraint.addAll(generateParameterConstraints(forConstructor, assumption, info, resolver));
|
methodConstraint.addAll(generateParameterConstraints(forConstructor, assumption, info, resolver));
|
||||||
return methodConstraint;
|
return methodConstraint;
|
||||||
}
|
}
|
||||||
|
@ -7,9 +7,10 @@ import java.lang.Boolean;
|
|||||||
|
|
||||||
public class OL {
|
public class OL {
|
||||||
|
|
||||||
m(x) { return x + x; }
|
java.lang.Double m(java.lang.Double x) { return x + x; }
|
||||||
|
java.lang.Integer m(java.lang.Integer x) { return x + x; }
|
||||||
m(Boolean x) { return 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.
|
// 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
|
// But if another methods are contained then the generated BC is not correct
|
||||||
|
Loading…
Reference in New Issue
Block a user