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
interfaceFoo{a: string|null;}functionbar(foo: Foo|null){constisNullish=foo?.a==null;if(isNullish){return;}// report "Object is possibly 'null'.(2531)" for "foo.a"console.log(foo.a.toUpperCase());}
π Actual behavior
Report an error Object is possibly 'null'.(2531) for foo.a
π Expected behavior
No error is reported
Additional information about the issue
I don't know this behavior is a bug or intended, but based on PR #44730 , I chose 'bug' for this issue.