Skip to content

Add hovers for supertype methods in method call expressions#113

Open
trustytrojan wants to merge 3 commits into
GroovyLanguageServer:masterfrom
trustytrojan:hover-supertype-method-call-expr
Open

Add hovers for supertype methods in method call expressions#113
trustytrojan wants to merge 3 commits into
GroovyLanguageServer:masterfrom
trustytrojan:hover-supertype-method-call-expr

Conversation

@trustytrojan
Copy link
Copy Markdown
Contributor

@trustytrojan trustytrojan commented May 18, 2026

Add hovers for methods that belong to supertypes of an object within a method call expression.

Before the change, in the GIF below, there was no hover for forEach.

After the change:
recording_2026-05-18_144127-ezgif com-video-to-gif-converter

Copilot AI review requested due to automatic review settings May 18, 2026 20:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Changes how method overloads are resolved from a MethodCallExpression so that inherited methods (from superclasses/interfaces) are considered, not just methods declared directly on the receiver's type.

Changes:

  • Replaced leftType.getMethods(name) with a filtered stream over getAllDeclaredMethods() to include inherited methods.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants