More poking around
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 3m1s

This commit is contained in:
Daniel Holle 2024-04-10 10:22:34 +02:00
parent b752219d8c
commit 4fc78f494c

View File

@ -208,8 +208,9 @@ public class StatementToTargetExpression implements ASTVisitor {
var isPrivate = false;
var signature = methodCall.signatureArguments().stream().map(converter::convert).toList();
var receiverClass = converter.compiler.getClass(new JavaClassName(converter.convert(methodCall.receiver.getType()).name()));
var receiverClass = converter.compiler.getClass(receiverName);
if (methodCall.receiver instanceof ExpressionReceiver expressionReceiver && expressionReceiver.expr instanceof This) {
if (receiverClass == null) throw new DebugException("Class " + receiverName + " does not exist!");
var thisMethod = converter.findMethod(receiverClass, methodCall.name, signature);
ClassOrInterface finalReceiverClass = receiverClass;
foundMethod = thisMethod.orElseGet(() -> findMethod(finalReceiverClass.getSuperClass().getName(), methodCall.name, signature).orElseThrow());