Skip to content

Rename refactoring doesn't take super parameters into account #52305

Closed
@bwilkerson

Description

@bwilkerson

With the lint `` enabled, it would be nice if super parameters that have the same name as the corresponding parameter in the super-constructor were renamed when the super-constructor's parameter is renamed (whether directly or by renaming a field in the case of a field formal parameter).

For example, given

class Base {
  Base(this.value);

  final int value;
}

class Sub extends Base {
  Sub(super.value);
}

It would be nice for super.value to be renamed if the field value is renamed.

Depending on the outcome of #59104, we might also want to rename the super parameter even when the name is the same modulo a leading underscore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-refactoringIssues with analysis server refactoringstype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions