You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling goto def. on Foo or baz from java returns empty results.
It seems to be connected with the presence of the generic parameter in the instance method.
If we comment out the whole instance method, goto def. starts to work correctly.
There is one more thing that I discovered which seems to be connected with another issue #6357
If we add class definition to the Foo file like so:
classFoo {}
objectFoo {
defbaz:String="SSSS"
}
Then both Foo and baz starts to navigating to Foo class definition.
Describe the bug
Given the following java code:
and some scala code in the same module:
Calling goto def. on
Foo
orbaz
from java returns empty results.It seems to be connected with the presence of the generic parameter in the
instance
method.If we comment out the whole
instance
method, goto def. starts to work correctly.There is one more thing that I discovered which seems to be connected with another issue #6357
If we add class definition to the
Foo
file like so:Then both
Foo
andbaz
starts to navigating toFoo
class definition.Full project to reproduce the issue: https://github.com/ghostbuster91/demos/tree/goto-def-generic
Expected behavior
I would expect goto definition to navigate to the
baz
method inside theFoo
object regardless of the presence of any type parameters in other methods.Operating system
Linux
Editor/Extension
Nvim (nvim-metals)
Version of Metals
1.3.0
Extra context or search terms
goto definition, java
The text was updated successfully, but these errors were encountered: