Comment #1 by andrej.mitrovich — 2012-12-09T09:11:03Z
(In reply to comment #0)
> To find null dereferencing in code the compiler probably needs to perform flow
> analysis.
> But the compiler can spot and flag as errors at compile-time expressions that
> follow explicit comparisons to null:
>
>
> if (obj is null && obj.foo()) { ...
What if 'foo' is a UFCS function? There's a slight possibility that such a check was expected. I guess the compiler could be more lax in the UFCS case and more careful if 'foo' is actually a method, so maybe this is implementable..
Comment #2 by robert.schadek — 2024-12-13T17:53:28Z