Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flow analysis] Update the spec to match implementation of
==
. (#4284)
In fully sound null safety mode, flow analysis should know that a test like `expr == null` is guaranteed to evaluate to `false` if the static type of `expr` is non-nullable. But in unsound null safety mode, no such guarantee can be made. Since support for unsound null safety was only recently removed from the CFE (see dart-lang/sdk@0060b0f), flow analysis still conservatively assumes that an expression with a non-nullable static type might, nonetheless, still be `null`. This change updates the spec to match the implementation in this regard, and adds a reference to #3100, where we are discussing the possibility of changing the behavior.
- Loading branch information