You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Breaking change to await, update to flatten. (#2333)
This PR specifies a breaking change to await, and an update to flatten which includes null safety. In particular, **flatten** is changed such that it is defined for type variables and intersection types. It changes `await` to throw when provided a `Future` value of a type that could provide an unsound value if awaited. This differs from the current specification, which instead treats the future as a value, so `await someFuture` can evaluate to `someFuture`. It also differs from the current implementation, which awaits `someFuture` to its value, whether the result is sound or not.
See also dart-lang/sdk#49396, #2326.
0 commit comments