Updates to void
.
#28943
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
area-meta
Cross-cutting, high-level issues (for tracking many other implementation issues, ...).
closed-obsolete
Closed as the reported issue is no longer relevant
language-strong-mode-polish
void
will be updated in the following way:void
accepts any value. The old behavior only allowednull
. In checked mode,void
should allow any value. #28935=>
) is allowed to have expressions of any type if the return type isvoid
. For examplevoid foo() => x++;
.void
arrow functions should allow any rhs type #28939void
is allowed as a type argument to generics. The most common use cases are things likeFuture<void>
orVisitor<void>
. Statically and dynamically, in Dart 1, a genericvoid
is treated similar toObject
, except for functions, where the old behavior is maintained. In particular, avoid
-function is not assignable to anint
-function (or any other non-void
function). Allow "void" as a type argument #27504The text was updated successfully, but these errors were encountered: