Skip to content

Commit

Permalink
Fix regression caused by #558
Browse files Browse the repository at this point in the history
Both the "create new method" and the "add cast to method invocation"
cases should work now.

Signed-off-by: David Thompson <[email protected]>
  • Loading branch information
datho7561 authored and mickaelistria committed Sep 10, 2024
1 parent 79f886a commit 220cac1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,10 @@ public ITypeBinding resolveExpressionType(Expression expr) {
}
var jcTree = this.converter.domToJavac.get(expr);
if (jcTree instanceof JCMethodInvocation javacMethodInvocation) {
return this.bindings.getTypeBinding(javacMethodInvocation.meth.type.asMethodType().getReturnType());
if (javacMethodInvocation.meth.type instanceof MethodType methodType) {
return this.bindings.getTypeBinding(methodType.getReturnType());
}
jcTree = javacMethodInvocation.meth;
}
if (jcTree instanceof JCFieldAccess jcFieldAccess) {
if (jcFieldAccess.type instanceof PackageType) {
Expand Down

0 comments on commit 220cac1

Please sign in to comment.