Skip to content

Wrong position for binding definitions #5583

Closed
@nicolasstucki

Description

@nicolasstucki

A position of the definition of binding y is wrong

x match {
  case y @ Some(_) => ...
        // ^ currently it point here
}

It can be reproduced in dotty.tools.languageserver.DefinitionTest with

@Test def goToBinding: Unit = {
    withSources(
      code"""class Foo {
            |val x = Some(6)
            |x match {
            |  case ${m1}y${m2} @ Some(_) => ${m3}y${m4}
            |}
       }"""
    ) .definition(m3 to m4, List(m1 to m2))
  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions