[Issue 1982] New: Problems with compile-time null

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 10 00:00:20 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=1982

           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 at digitalmars.com
        ReportedBy: samukha at 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.


-- 



More information about the Digitalmars-d-bugs mailing list