www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1982] New: Problems with compile-time null


           Summary: Problems with compile-time null
           Product: D
           Version: 2.012
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: samukha voliacable.com

More test cases that should pass:

enum a = [1, 2, 3];
static assert (a !is null);

string foo()
    return null;

static assert (foo() is null);
static assert (!foo().length);

static assert (null is null);

Neither of the assert expressions can be evaluated at compile time.

Apr 10 2008