mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
919461badd
Fixes https://github.com/dart-lang/sdk/issues/34147. The Dart language specification says we should ensure booleans are non-null in the following (non-exhaustive) situations: * (ternary) conditional expressions - this includes the `!` operator since `!x` is equivalent to `x ? false : true` * arguments to logical boolean expressions (`||` and `&&`), modulo short-circuiting * `if` conditions * `for` loop conditions * `while` conditions * `do`/`while` conditions With control-flow-collections enabled, this CL will also cover conditions in `if` elements and `for` elements. Tests for these already exist in language_2/control_flow_collections/{if,for}_null_condition_test.dart. Change-Id: I2ce9a30adeb16a0a68411f358f69aeca08656dab Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98780 Commit-Queue: Mayank Patke <fishythefish@google.com> Reviewed-by: Stephen Adams <sra@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com> |
||
---|---|---|
.. | ||
bin | ||
lib | ||
api_readme.md | ||
BUILD.gn |