Merge remote-tracking branch 'origin/master'

This commit is contained in:
Krauß, Josefine 2024-07-03 12:32:38 +02:00
commit f6358867f0

View File

@ -132,7 +132,9 @@ public class MethodCallStatementExpression extends AbstractType implements IExpr
throw new ExecutionControl.NotImplementedException("Receiver type not supported.");
}
} else {
throw new ExecutionControl.NotImplementedException("Receiver is null.");
mv.visitVarInsn(Opcodes.ALOAD, 0);
owner = thisClass;
}
String returnOfPreviousMethod = null;
// Invoke the method for each receiving method in the chain
@ -196,14 +198,19 @@ public class MethodCallStatementExpression extends AbstractType implements IExpr
}
descriptor.append(")");
String classToSearchMethodIn;
//Return Type
String classToSearchMethodIn = localVars.get(receiver.identifier);
if (receiver != null) {
classToSearchMethodIn = localVars.get(receiver.identifier);
if (classToSearchMethodIn == null) {
classToSearchMethodIn = returnOfPreviousMethod;
}
if (classToSearchMethodIn == null) {
classToSearchMethodIn = thisClass;
}
} else {
classToSearchMethodIn = thisClass;
}
String returnType = methodContext.get(classToSearchMethodIn).get(methodName).keySet().toArray()[0].toString();