-
Notifications
You must be signed in to change notification settings - Fork 330
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
Inconsistent syntax highlighting with extension method #5630
Comments
Thanks for the report. In the first example also highlight and go to definition don't work, which should also get fixed. |
Is there a link between metals presentation compiler's and dotty's ? It seems it's the same code but I do not see any submodule |
The presentation compiler is getting moved from metals to dotty. You can read more here. And here is the initial commit that adds pc to dotty. We are currently in this, a bit awkward, transition state, where the presentation compiler is maintained both in dotty and metals. We have to keep both up to date until the release of LTS 3.3.2, and even after that, it seems prudent to provide bug fixes for older versions such as 3.2.2 for a while longer. |
For: ```Demo.scala class MyIntOut(val value: Int) object MyIntOut: extension (i: MyIntOut) def uneven = i.value % 2 == 1 val a = MyIntOut(1).uneven ``` `uneven` call in the typed tree has span `<126..126>`, where it should be `<138..144>`. connected to: scalameta/metals#5630 I'm open to suggestions on how to do it nicer.
This is fixed now. |
Describe the bug
Extension methods from top-level
extension
are correctly highlighted, but if it is nested in the companion object then it appears as a fieldExpected behavior
Extension method defined in companion object should appear as a method
Operating system
Linux
Editor/Extension
VS Code
Version of Metals
v1.0.1+22-acf9aec2-SNAPSHOT
Extra context or search terms
Semantic highlighting
The text was updated successfully, but these errors were encountered: