Skip to content

Occurrences not working correctly for super parameters #48281

Open
@bwilkerson

Description

@bwilkerson

Given a file containing

class A {
  A(int x);
}

class B extends A {
  int y;

  B(super.x) : y = x * 2;

  B.x(this.y) : assert(y > 0), super(0);
}

If I select the reference to y in the assert, then that reference, the y in this.y, the y in y = x * 2, and the y in the field declaration are all highlighted. Basically, we've said that the this.y parameter and the field are the same, so any references to either one should all be highlighted at the same time.

On the other hand, if I select the x in super.x, then the field declaration (in A) is highlighted, but the x in x * 2 is not. I think that for consistency it needs to be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-intellijTracking issues for the Dart IntelliJ plugin.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions