Skip to content

Semanticdb - backquoted ident range ignores backquote symbols #14012

Open
@dos65

Description

@dos65

Having the following source:

package example

object Foo {
  val `a` = 4
}

The range of a occurrence points only a ignoring backquotes

tests/input3/src/main/scala/example/test.scala
----------------------------------------------

Summary:
Schema => SemanticDB v4
Uri => tests/input3/src/main/scala/example/test.scala
Text => empty
Language => Scala
Symbols => 2 entries
Occurrences => 3 entries

Symbols:
example/Foo. => final object Foo extends Object { self: Foo.type => +2 decls }
example/Foo.a. => val method aInt

Occurrences:
[0:8..0:15) <= example/
[2:7..2:10) <= example/Foo.
[3:7..3:8) <= example/Foo.a.

While in Scala2 the same occurrence is:

[3:6..3:9) <= example/Foo.a.

Expectations

The range of Foo.a should be [3:6..3:9)

Additional info

I've did a quick look and the issues might be not only related to Semanticb Extraction.
The additional thing is that Property.Backquoted isn't set in all cases in Parser. So it's needed to be fixed first to have an option to check if range should be extended at semanticdb phase

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions