CFE allows await voidExpression
.
#40685
Labels
front-end-missing-error
legacy-area-front-end
Legacy: Use area-dart-model instead.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
The language specification allows
void
-typed expressions to occur only in an enumerated number of syntactical positions. Those do not includeawait voidExpression
.If you do:
it should be a compile-time error, but it is accepted by both the front-end and the analyzer (the latter with a hint about awaiting a non-future).
The spec says:
and then goes on to list the rules which do not include
await
. So, the code above should be a compile-time error.The text was updated successfully, but these errors were encountered: