Implement error about awaiting a type that is incompatible with await #54647
Labels
area-meta
Cross-cutting, high-level issues (for tracking many other implementation issues, ...).
feature-extension-types
Implementation of the extension type feature
implementation
Track the implementation of a specific feature (use on area-meta issue, not issues for each tool)
The PR dart-lang/language#3560 introduces the notion that a type can be incompatible with await. This concept is used to specify a new and broader error about expressions of the form
await e
where the static type ofe
has associations with an extension type that does not implementFuture
.The previous rules just made it an error when the type was such an extension type, now it is also an error when it is
T?
whereT
is incompatible with await, or a type variable that extends such a type, etc. Details in dart-lang/language#3560. Example:Subtasks:
The text was updated successfully, but these errors were encountered: