Skip to content

unawaited_futures doesn't work when method/function is not marked async #57653

Closed
@zoechi

Description

@zoechi
Future<Null> sendInvitations() async { ... }
String doSomething() {
    inviteController
      ..sendInvitations() // <<<==== would expect a hint
      ..updateSearchTerm('');
}

but I don't get one.

Changing it to

Future<String> doSomething() async {

makes the lint show up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4area-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