On 2/5/18 3:21 PM, Steven Schveighoffer wrote:

IMO, you shouldn't have to cast to int first, if you are just casting back to byte:

int x = cast(byte)-b;

assert(x == -128) // both with and without intpromote

But I don't know if the compiler can be made to see this eventual result and not output the deprecation. Either way, the deprecation is still not a full error.

It shouldn't output the deprecation I think: https://issues.dlang.org/show_bug.cgi?id=18380

-Steve
              • Re:... H. S. Teoh via Digitalmars-d
              • Re:... Luís Marques via Digitalmars-d
              • Re:... H. S. Teoh via Digitalmars-d
              • Re:... Luís Marques via Digitalmars-d
              • Re:... Dominikus Dittes Scherkl via Digitalmars-d
              • Re:... Luís Marques via Digitalmars-d
              • Re:... Steven Schveighoffer via Digitalmars-d
              • Re:... Nick Sabalausky (Abscissa) via Digitalmars-d
        • Re: Annoyance wi... Dmitry Olshansky via Digitalmars-d
  • Re: Annoyance with new intege... Steven Schveighoffer via Digitalmars-d
    • Re: Annoyance with new i... Steven Schveighoffer via Digitalmars-d

Reply via email to