1 // https://issues.dlang.org/show_bug.cgi?id=21794
16 const x
= cast(ulong)p
;
20 static assert(fun(null));
27 // These were an error before, they were returning a NullExp instead of IntegerExp/RealExp
29 static assert(fun2
!int(null) == 0);
30 static assert(fun2
!uint(null) == 0);
31 static assert(fun2
!long(null) == 0);
32 static assert(fun2
!ulong(null) == 0);
33 static assert(fun2
!float(null) == 0);
34 static assert(fun2
!double(null) == 0);
35 static assert(fun2
!real(null) == 0);
37 // These were printing 'null' instead of the corresponding number
39 const i
= cast(int)null;
40 const ui
= cast(uint)null;
41 const l
= cast(long)null;
42 const ul
= cast(ulong)null;
43 const f
= cast(float)null;
44 const d
= cast(double)null;
45 const r
= cast(real)null;