modified: ../../../src/main/java/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java

modified:   ../../../src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
This commit is contained in:
pl@gohorb.ba-horb.de 2023-01-23 15:13:51 +01:00
parent 69bdb4aa5b
commit 9e6b2e9ced
2 changed files with 9 additions and 1 deletions

View File

@ -39,6 +39,14 @@ public class MethodAssumption extends Assumption{
return receiver;
}
public RefTypeOrTPHOrWildcardOrGeneric getReturnType() {
return retType;
}
public List<? extends RefTypeOrTPHOrWildcardOrGeneric> getArgTypes(){
return params;
}
public RefTypeOrTPHOrWildcardOrGeneric getReturnType(GenericsResolver resolver) {
return resolver.resolve(retType);
}

View File

@ -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