diff --git a/src/main/java/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java b/src/main/java/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java index 6e6c5c5a..23f08039 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java @@ -38,6 +38,14 @@ public class MethodAssumption extends Assumption{ public ClassOrInterface getReceiver(){ return receiver; } + + public RefTypeOrTPHOrWildcardOrGeneric getReturnType() { + return retType; + } + + public List getArgTypes(){ + return params; + } public RefTypeOrTPHOrWildcardOrGeneric getReturnType(GenericsResolver resolver) { return resolver.resolve(retType); diff --git a/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java b/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java index 4128d01c..c130ac35 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java @@ -654,7 +654,7 @@ public class TYPEStmt implements StatementVisitor{ foMethod.arglist.getArguments().get(i).accept(this); RefTypeOrTPHOrWildcardOrGeneric argType = foMethod.arglist.getArguments().get(i).getType(); RefTypeOrTPHOrWildcardOrGeneric assType = assumption.getArgTypes(resolver).get(i); - ret.add(new Pair(assType, foMethod.argTypes.get(i), PairOperator.EQUALSDOT)); + ret.add(new Pair(foMethod.argTypes.get(i), assumption.getArgTypes().get(i), PairOperator.EQUALSDOT)); ret.add(new Pair(argType, assType, PairOperator.SMALLERDOT)); //Fuer Bytecodegenerierung PL 2020-03-09 wird derzeit nicht benutzt ANFANG