Skip to content

"Find all references" on invocation of a getter/setter only returns other references as a get (or set) #5065

@escamoteur

Description

@escamoteur

Describe the bug
If you take this example:

  void markDirty() {
    _needsRefreshFromBackend = true;
  }

  bool _needsRefreshFromBackend = false;

and you select "Find all References" on the definition of the property _needsRefreshFromBackend you get all usages of this property using it as a setter or a getter.
If you do the same on its usage inside markDirty you only get locations where the property is used as a setter.

if you do the same at a place where it is used as a getter you only get the locations where it is used as a getter.

This might be semantically be correct but probably not what the user wants or expects as normally they want to see really all places where a property is used.

Something similar can be observed if you use "Find all references" on methods in abstract classes vs where they are implemented/extended although there it might make some sense. However, I recall having had situations where I wondered why certain places were sometimes shown and otherwise not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresis bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions