Skip to content

use_super_parameters doesn't trigger if types change #59226

@goderbauer

Description

@goderbauer
class Foo {
  Foo({required this.foo});

  num foo;
}

class Bar extends Foo {
  Bar({required int foo}) : super(foo: foo);
}

The code above can be refactored to use super params as shown below, but the lint doesn't trigger

class Foo {
  Foo({required this.foo});

  num foo;
}

class Bar extends Foo {
  Bar({required int super.foo});
}

Note: if in the original example int is removed, the lint triggers as expected.

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-linterIssues with the analyzer's support for the linter packagelinter-false-negativeIssues related to lint rules that fail to report a problem.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