[Issue 2940] New: null is null cannot be evaluated at compile time

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 5 00:58:45 PDT 2009


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

           Summary: null is null cannot be evaluated at compile time
           Product: D
           Version: 1.042
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: patch, rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: clugdbug at yahoo.com.au


static assert(null is null);
---
bug.d(1): Error: static assert  (null is null) is not evaluatable at compile t
ime

Whereas the code below compiles fine:
int main(){ 
   return (null is null);
}
---
This also applies to similar kinds of expressions, eg (null is typeid(int)).

The patch for this relies on my patch for 1524, otherwise you get an ICE with
"null is typeid(int)".


-- 



More information about the Digitalmars-d-bugs mailing list