Commit 1b4215a
authored
[flow analysis] Update the spec to match implementation of
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.==. (#4284)1 parent 5226bc7 commit 1b4215a
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
561 | | - | |
562 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
563 | 567 | | |
564 | 568 | | |
565 | 569 | | |
| |||
0 commit comments