Debian Codegraph @

gcc/testsuite/gdc.test/compilable/test19970.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=19970
2
3 enum void* p = cast(void*)0;
4 static assert(p is null);
5 static assert(ctfeLocal(p));
6 static assert(ctfeGlobal());
7
8 bool ctfeGlobal ()
9 {
10 return p is null;
11 }
12
13 bool ctfeLocal (const void* ptr) pure
14 {
15 return ptr is null;
16 }