Skip to content

Analyser doesn't recognize global variable if I use await in a function that is marked not async #38236

Open
@escamoteur

Description

@escamoteur

Hi,

first thanks for this awesome tool set!

Was just fooled by the analyzer before I understood what happened I have this function here

image

On my way to convert this to a non async method I deleted the first await and then the async and suddenly got this:

image

And was pretty confused why suddenly backend was no longer defined. I had to delete the second await before the analyzer would recognize backend again.

Cheers
Thomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestanalyzer-recoveryarea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.contributions-welcomeContributions welcome to help resolve this (the resolution is expected to be clear from the issue)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