In the below code, the second guard can't assert non-nullity of ab.cv inside the forEach loop, where uncommenting a local identical guard makes it work. Why is it so?
type B = {|
bv: B[],
cv: ?number
|}
let ab: B = {bv: [], cv: 1}
if (ab.cv) { // First guard
const a = ab.cv + 1 // Works
}
var a2;
if (ab.cv) { // Second guard
ab.bv.forEach(b => {/*if (ab.cv) */a2 = ab.cv + 1}) // Doesn't work except if uncommented
// Cannot perform arithmetic operation because null or undefined [1] is not a number.
}