Skip to content

Support navigation from unnamed constructor (.new) #97

@parlough

Description

@parlough

Is your feature request related to a problem? Please describe.

When on an unnamed constructor reference (such as new in Test.new below), "Go to declaration" results in "Cannot find declaration to go to". It does however work for named constructors.

class Test {
  Test();
}

void main() {
  print(Test.new);
  //          ^ Navigate from here
}

Describe the solution you'd like.

I'd expect this to navigate to the Test() constructor if present. If not present, I'd expect it to the navigate me to the class declaration/name. Thanks!

Additional context:

Navigating from the unnamed constructor does work in LSP-based editors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions