Skip to content

Renaming field doesn't update constructors on subclasses of subclasses #60803

Open
@FMorschel

Description

@FMorschel

Repro:

class Base {
  Base({required this.propriety});

  String propriety;
}

class Second extends Base {
  Second({required super.propriety});
}

class Third extends Second {
  Third({required super.propriety});
}

If you rename propriety to newName:

class Base {
  Base({required this.newName});

  String newName;
}

class Second extends Base {
  Second({required super.newName});
}

class Third extends Second {
  Third({required super.propriety}); // implicit_super_initializer_missing_arguments + super_formal_parameter_without_associated_named
}

I'll take a look at this

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.type-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