<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.4.1 **Code** ```ts // strictNullChecks should be on let a: number | null = null; [1].forEach(() => { a = 1; }); if (a !== null) { console.log(a + 1); } ``` **Expected behavior:** Output '2'. **Actual behavior:** error TS2365: Operator '+' cannot be applied to types 'never' and '1'. Actually, after the forEach loop the inferred type of 'a' remains to be 'null', although it may change during the loop.