From 9e6b2e9ced4a05ac5c67295f9fd5dd290efed98d Mon Sep 17 00:00:00 2001 From: "pl@gohorb.ba-horb.de" Date: Mon, 23 Jan 2023 15:13:51 +0100 Subject: [PATCH] modified: ../../../src/main/java/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java modified: ../../../src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java --- .../typeinference/assumptions/MethodAssumption.java | 8 ++++++++ .../de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) 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