Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect goto definition #4255

Closed
ckipp01 opened this issue Aug 12, 2022 · 2 comments
Closed

Incorrect goto definition #4255

ckipp01 opened this issue Aug 12, 2022 · 2 comments
Assignees
Labels
improvement Not a bug or a feature, but something general we can improve semanticdb Related to semanticdb usage in Metals
Milestone

Comments

@ckipp01
Copy link
Member

ckipp01 commented Aug 12, 2022

Describe the bug

When doing a goto definition on Indexer here:

This brings me to the companion object here:

Even though in this scenario you'd expect and want it to bring you to the actual case class here:

Expected behavior

I'd expect to navigate to the case class.

Operating system

macOS

Editor/Extension

Nvim (nvim-metals)

Version of Metals

0.11.8+11-bfe6c2ca-SNAPSHOT

Extra context or search terms

No response

@tgodzik
Copy link
Contributor

tgodzik commented Aug 12, 2022

Thanks for reporting! This seems another one that I ignored 😅 and it actually popped up a couple of times. Let me check it out. Keep those issues coming! :D

@tgodzik tgodzik self-assigned this Aug 12, 2022
tgodzik added a commit to tgodzik/metals that referenced this issue Aug 24, 2022
Previously, DefinitionProvider would just look for the definition of object. Now, it also checks if the object is not a synthetic apply and in that case it tries to find that exact apply.

Fixes scalameta#4255
tgodzik added a commit to tgodzik/metals that referenced this issue Aug 24, 2022
Previously, DefinitionProvider would just look for the definition of object. Now, it also checks if the object is not a synthetic apply and in that case it tries to find that exact apply.

Fixes scalameta#4255
@tgodzik tgodzik added improvement Not a bug or a feature, but something general we can improve presentation-compiler Something relating to the presentation compiler semanticdb Related to semanticdb usage in Metals and removed presentation-compiler Something relating to the presentation compiler labels Aug 24, 2022
@tgodzik
Copy link
Contributor

tgodzik commented Aug 24, 2022

Duplicate of #1809

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Not a bug or a feature, but something general we can improve semanticdb Related to semanticdb usage in Metals
Projects
None yet
Development

No branches or pull requests

2 participants