AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER constant

CompileTimeErrorCode const AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER

nnbd/feature-specification.md

It is an error for the initializer expression of a late local variable to use a prefix await expression.

Implementation

static const CompileTimeErrorCode AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER =
    CompileTimeErrorCode('AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER',
        "The await expression can't be used in a 'late' local variable.",
        correction:
            "Try removing the 'late' modifier, or rewriting the initializer "
            "without using the 'await' expression.")