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



--- Comment #2 from Don <[email protected]> 2013-01-07 09:07:42 PST ---
This passes on Linux32 and 64, on 1.076 and 2.061. Also tested on D1.073 so it
has been working for quite some time on Linux. Need to check if it is
Windows-specific.

void main() {
    static assert((cast(ushort)(-1.0)) == 0xFFFF);
    static assert((cast(ushort)(-1.0L)) == 0xFFFF);
    static assert((cast(uint)(-1.0)) == 0xFFFF_FFFF);
    static assert((cast(uint)(-1.0L)) == 0xFFFF_FFFF);
    static assert((cast(ulong)(-1.0L)) == 0xFFFF_FFFF_FFFF_FFFFUL);

    assert((cast(ushort)(-1.0)) == 0xFFFF);
    assert((cast(ushort)(-1.0L)) == 0xFFFF);
    assert((cast(uint)(-1.0)) == 0xFFFF_FFFF);
    assert((cast(uint)(-1.0L)) == 0xFFFF_FFFF);
    assert((cast(ulong)(-1.0L)) == 0xFFFF_FFFF_FFFF_FFFFUL);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to