Skip to content

avoid_annotating_with_dynamic and new typedef #57789

Open
@dotdoom

Description

@dotdoom

I'm struggling to make an otherwise useful avoid_annotating_with_dynamic work with my typedef:

typedef CallbackWithParameter = Future<void> Function(dynamic);
// or
typedef CallbackWithParameter = Future<void> Function(dynamic parameter);

both are syntactically valid, but none satisfies this lint check. Templatizing CallbackWithParameter fixes this, but it's not exactly what I'm looking for. Is this check incompatible with the new typedefs?

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-positiveIssues related to lint rules that report a problem when it isn't 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