Skip to content

[SemanticDB] scala.runtime.EnumValue gets added to occurrences in semanticdb #11689

Closed
@tgodzik

Description

@tgodzik

While adding more tests in Metals in this PR we found a number of minor issue connected to semanticdb.

Compiler version

3.0.0-RC1

Minimized code

Printing the example together with the semanticdb occurrences in the document,

Additional scala.runtime.EnumValue gets added to semanticdb despite not existing in the source file:

package example
enum Color(val rgb: Int):
   case Red   extends Color(0xFF0000)
   case Green extends Color(0x00FF00)
   case Blue  extends Color(0x0000FF)

Output

package example
enum Color/*example.Color#*/(val rgb/*example.Color#rgb.*/: Int/*scala.Int#*/):
   case Red/*example.Color.Red.*/   extends Color/*example.Color#*/(0xFF0000)/*scala.runtime.EnumValue#*/
   case Green/*example.Color.Green.*/ extends Color/*example.Color#*/(0x00FF00)/*scala.runtime.EnumValue#*/
   case Blue/*example.Color.Blue.*/  extends Color/*example.Color#*/(0x0000FF)/*scala.runtime.EnumValue#*/

Expectation

package example
enum Color/*example.Color#*/(val rgb/*example.Color#rgb.*/: Int/*scala.Int#*/):
   case Red/*example.Color.Red.*/   extends Color/*example.Color#*/(0xFF0000)
   case Green/*example.Color.Green.*/ extends Color/*example.Color#*/(0x00FF00)
   case Blue/*example.Color.Blue.*/  extends Color/*example.Color#*/(0x0000FF)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions