mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:27:39 +00:00
Allow void on the RHS of null coalescing expressions
Change-Id: I2e2d16c890c735260669d60725085861e66996aa Reviewed-on: https://dart-review.googlesource.com/67081 Reviewed-by: Erik Ernst <eernst@google.com>
This commit is contained in:
parent
17cb6d95d1
commit
73663ae7c6
|
@ -274,6 +274,8 @@ for the following situations:
|
|||
type void; the static type of the conditional expression is then the
|
||||
type void. (*This is true even if one of the branches has a different
|
||||
type.*)
|
||||
* In a null coalescing expression `e1 ?? e2`, `e2` may have the type void; the
|
||||
static type of the null coalescing expression is then the type void.
|
||||
* If _N1_ and _N2_ are non-terminals in the Dart grammar, and there is a
|
||||
derivation of the form _N1 --> N2_, and _N2_ can have type void, then
|
||||
_N1_ can also have type void for such a derivation. *In this derivation
|
||||
|
|
Loading…
Reference in a new issue