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

Emit method overload symbol in Scala mtags #282

Closed
olafurpg opened this issue Apr 10, 2018 · 3 comments
Closed

Emit method overload symbol in Scala mtags #282

olafurpg opened this issue Apr 10, 2018 · 3 comments
Labels
navigation Related to goto definition, find references, open symbol

Comments

@olafurpg
Copy link
Member

olafurpg commented Apr 10, 2018

Java mtags currently emits field symbols for methods.

def foo(a: Int, b: String) 
// field: foo.
// method foo(Int, String)

it would be nice if Scala mtags emitted correct method symbols so it's possible to goto definition to the precise overload of a method.

The specification for Scala method symbol syntax is documented here https://github.com/scalameta/scalameta/blob/master/semanticdb/semanticdb3/semanticdb3.md#scala-symbol

The place to fix this issue is here https://github.com/scalameta/metals/blob/905bf282299f7c136b40173103cf367073dc55f8/metals/src/main/scala/scala/meta/metals/mtags/SclaMtags.scala
and to test the fix

https://github.com/scalameta/metals/blob/905bf282299f7c136b40173103cf367073dc55f8/metals/src/test/scala/tests/mtags/ScalaMtagsTest.scala

Related #281

@amarrella
Copy link

I'm gonna try to solve this today :)

@olafurpg
Copy link
Member Author

Fixed in #275 once that PR is merged

@olafurpg olafurpg added navigation Related to goto definition, find references, open symbol and removed good first issue labels Sep 26, 2018
@olafurpg
Copy link
Member Author

Fixed in #292, mtags emits correct method overloads for both Scala and Java and we have a lot better tests to detect regressions in this space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
navigation Related to goto definition, find references, open symbol
Projects
None yet
Development

No branches or pull requests

2 participants