You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flow analysis expressions] Fix instance check and assignment to match implementation. (#4307)
This change fixes three spec inaccuracies:
1. The spec claimed that when flow analysis encounters an expression
`N` of the form `V = E` (a local variable assignment), it would set
`true(N)` and `false(N)` based on `true(E)` and `false(E)`. Note that
we *could* have implemented flow analysis this way; if we had, then a
test like `if (v1 = v2 is T)` would have promoted `v2` to `T`. But we
didn't implement that functionality.
2. The spec failed to document the special behavior of expressions of
the form `E is Never`. Flow analysis knows that expressions of this
form cannot evaluate to `true`.
3. The spec failed to document the special behavior of expressions of
the form `E is! T`. `E is! T` is understood by flow analysis to behave
the same as `!(E is T)`.
0 commit comments