dmd/compiler/test/compilable/test19970.d
2022-07-09 18:53:07 +02:00

16 lines
277 B
D

// https://issues.dlang.org/show_bug.cgi?id=19970
enum void* p = cast(void*)0;
static assert(p is null);
static assert(ctfeLocal(p));
static assert(ctfeGlobal());
bool ctfeGlobal ()
{
return p is null;
}
bool ctfeLocal (const void* ptr) pure
{
return ptr is null;
}