Skip to content

bugfix: Show hover on derives clause#25804

Merged
tgodzik merged 2 commits into
scala:mainfrom
tgodzik:derives-fix
Apr 21, 2026
Merged

bugfix: Show hover on derives clause#25804
tgodzik merged 2 commits into
scala:mainfrom
tgodzik:derives-fix

Conversation

@tgodzik
Copy link
Copy Markdown
Contributor

@tgodzik tgodzik commented Apr 15, 2026

Connected to #19489 (we should make sure other features work, but for not this tackles hover)

How much have you relied on LLM-based tools in this contribution?

Not much, just the tests.

How was the solution tested?

New automated tests (including the issue's reproducer, if applicable)

@tgodzik tgodzik requested review from rochala and zielinsky April 15, 2026 17:04
using indexedContext
)

def hoverSignature(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This code is all extracted.


if tp.isError || tpw == NoType || tpw.isError || path.isEmpty
then
val untpdPath = Interactive.resolveTypedOrUntypedPath(enclosing, pos)(using ctx)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Here and the next changed lines are the actual fix.

Copy link
Copy Markdown
Member

@zielinsky zielinsky left a comment

Choose a reason for hiding this comment

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

lgtm, one nitpick from me

Comment thread presentation-compiler/src/main/dotty/tools/pc/HoverProvider.scala Outdated
@tgodzik tgodzik merged commit 27ea724 into scala:main Apr 21, 2026
45 checks passed
@tgodzik tgodzik deleted the derives-fix branch April 21, 2026 06:52
mbovel pushed a commit to mbovel/dotty that referenced this pull request May 4, 2026
Connected to scala#19489 (we should
make sure other features work, but for not this tackles hover)

## How much have you relied on LLM-based tools in this contribution?

Not much, just the tests.

## How was the solution tested?

New automated tests (including the issue's reproducer, if applicable)
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