https://issues.dlang.org/show_bug.cgi?id=12974

--- Comment #5 from bearophile_h...@eml.cc ---
With the latest alpha compiler this works correctly on my Windows 32 bit:

void main() {
    import std.math;

    immutable ulong r2 = 12157665459056928801uL;
    immutable ulong three = 3uL;
    assert(three ^^ 40uL == r2); // OK
    assert(3uL ^^ 40uL == r2);   // OK
}


While this shows the problem:

void main() {
    import std.math;
    ulong X = uint.max;
    assert(X ^^ 2uL == 18446744065119617025uL);               // OK
    assert(ulong(uint.max) ^^ 2uL == 12157665459056928801uL); // Fails
}

--

Reply via email to