Skip to content

Incorrect position on first definition in multiple variable declaration #13067

@kasiaMarek

Description

@kasiaMarek

Reproduction steps

In the following code:

object O {
  val xx, yy, zz = 1
}

ValDef tree for x has incorrect position, the position is an offset instead of range.

Value definition positions:

  • xx - line-2,offset=17 //offset
  • yy - (21, 21, 31) //range
  • zz - (25, 25, 31) //range

Scala version: 2.13.15

Problem

I would expect the val def tree for xx to have a range position (17, 17, 31).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions