Skip to content

Implement return-type matching for method invocations in MethodMatcher#150

Merged
RadikalJin merged 1 commit into
mainfrom
feature/method-matcher-return-type-for-invocations
May 29, 2026
Merged

Implement return-type matching for method invocations in MethodMatcher#150
RadikalJin merged 1 commit into
mainfrom
feature/method-matcher-return-type-for-invocations

Conversation

@RadikalJin

Copy link
Copy Markdown
Member

Return-type matching previously only worked for MethodDeclaration nodes and was silently ignored for MethodInvocation, ClassInstanceCreation and the IMethodBinding overload. This resolves the method binding and compares the fully qualified return type (erasure for generics, void handled), sharing the comparison logic across all node kinds, with inner-class ($ -> .) normalisation and warn + non-match handling for unresolved bindings.

Return-type matching previously only worked for MethodDeclaration nodes and
was silently ignored for MethodInvocation, ClassInstanceCreation and the
IMethodBinding overload. This resolves the method binding and compares the
fully qualified return type (erasure for generics, void handled), sharing the
comparison logic across all node kinds, with inner-class ($ -> .) normalisation
and warn + non-match handling for unresolved bindings.
@RadikalJin RadikalJin merged commit 130685e into main May 29, 2026
2 checks passed
@RadikalJin RadikalJin deleted the feature/method-matcher-return-type-for-invocations branch May 29, 2026 16:09
@RadikalJin RadikalJin restored the feature/method-matcher-return-type-for-invocations branch May 29, 2026 16:46
@RadikalJin RadikalJin deleted the feature/method-matcher-return-type-for-invocations branch May 29, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant