Skip to content

unawaited_futures false negative for FutureOr #59105

Open
@FMorschel

Description

@FMorschel

Describe the issue
unawaited_futures not linting with FutureOr

To Reproduce
Add the lint to analysis_options.yaml and run the following:

void main() async {
  futureOrFunc(); //Nothing
  futureFunc(); //Linted
}

Future<void> futureFunc() async {}

FutureOr<void> futureOrFunc() async {}

Expected behavior
I expected the linter to warn me about FutureOr Functions so that I only process things after the previous lines have been processed.

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