Skip to content

Commit

Permalink
Fix resolveBindings(LambdaExpression)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickaelistria committed Aug 29, 2024
1 parent 7db6610 commit b57a9ed
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,8 @@ IMethodBinding resolveMethod(LambdaExpression lambda) {
JCTree javacElement = this.converter.domToJavac.get(lambda);
if (javacElement instanceof JCLambda jcLambda) {
JavacTypeBinding typeBinding = this.bindings.getTypeBinding(jcLambda.type);
if (typeBinding != null && typeBinding.getDeclaredMethods().length == 1 && typeBinding.getDeclaredMethods()[0] instanceof JavacMethodBinding javacMethodBinding) {
return this.bindings.getLambdaBinding(javacMethodBinding);
if (typeBinding != null && typeBinding.getFunctionalInterfaceMethod() instanceof JavacMethodBinding methodBinding) {
return this.bindings.getLambdaBinding(methodBinding);
}
}
return null;
Expand Down

0 comments on commit b57a9ed

Please sign in to comment.