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
As far as I understood from both #11263 and #11432, control flow analysis for implicit any and array initialization shouldn't be limited to the case when --noImplicitAny is enabled.
But currently it works only if --noImplicitAny is on.
If --noImplicitAny is off, variables are treated as 'any', and arrays are treated as 'any[]', after all the initializations.
functionfoo(flag: boolean){leta;if(flag)a=5;elsea=true;a;// if --noImplicitAny is on, it is 'number | boolean', otherwise, it is 'any'}
Is it an expected behavior, or should CFA for implicit any and array initialization work regardless of the state of --noImplicitAny flag?