-
Notifications
You must be signed in to change notification settings - Fork 433
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
"Go To Definition" shows overloading methods rather than going to the actual method #3095
Comments
Cannot reproduce it on my side: gtd.mp4The only difference is that I'm not using Remote extension. I directly tested it locally. - I don't think this has impact on the behavior. |
@jdneo I feared that you might not be able to reproduce. It also might be a setting though. I will try to see if it makes a difference on non remote. Thanks for taking the time. |
Don't forget to check the enabled extensions. Maybe the definition location is contributed by some other extensions. |
@jdneo thanks for the hint regarding other extensions, FYI it seems to be the Metals Scala extension which somehow "overrides" the go to definition command in the java project to a slightly enhanced full text search. |
When having multiple overloaded versions of a method, the "Go To Definition" (Ctrl+Click, etc.) will not got the actual method but show all overloaded versions.
Environment
Steps To Reproduce
method1
method Ctrl+Click on the othermethod1
call.[Please attach a sample project reproducing the error]
Please attach logs
Current Result
Expected Result
Expected is a jump the the second
method1
implementation because it is the only correct definition.Additional Informations
If use "Search for references" for the same
method1
call it correctly shows this:Also the reference hints at the methods itself are correct (see the screenshot the first
method1
has 0 references, while the other two have each 1 reference).The text was updated successfully, but these errors were encountered: