[Issue 1681] New: cast(real) ulong.max == 0

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 21 11:16:36 PST 2007


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

           Summary: cast(real) ulong.max == 0
           Product: D
           Version: 2.007
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: andrei at metalanguage.com


The title says it all. Here's a test:

import std.stdio;
import std.conv;

void main()
{
    real r = ulong.max;
    ulong d = cast(ulong) r;
    writeln(d);
    assert(d == ulong.max); // should not fail
}


-- 



More information about the Digitalmars-d-bugs mailing list