Summary: Dereferencing null error in a single expression
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from 2010-09-21 04:44:16 PDT ---
To find null dereferencing in code the compiler probably needs to perform flow
But the compiler can spot and flag as errors at compile-time expressions that
follow explicit comparisons to null:

if (obj is null && { ...

Where the programmer probably meant to write:
if (obj !is null && { ...
if (obj is null || { ...

This test doesn't cover several cases of dereference null errors that span
different lines of code, but the cases it covers seem common enough to me.

See also bug 4595
See also bug 4571

See also:

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to