From 8db1851c5ce4c74676e38c822f8678aaba421a3c Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Thu, 4 Jan 2018 05:36:46 +0100 Subject: Update dmd to 2.078.0 --- source/tanya/container/string.d | 3 ++- source/tanya/math/mp.d | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/tanya/container/string.d b/source/tanya/container/string.d index 73aab41..1b95cfd 100644 --- a/source/tanya/container/string.d +++ b/source/tanya/container/string.d @@ -264,7 +264,8 @@ if (is(Unqual!E == char)) body { dchar chr; - ubyte units, mask; + ubyte units; + int mask; const(char)* it = this.begin; if (*it & 0x80) diff --git a/source/tanya/math/mp.d b/source/tanya/math/mp.d index a045b25..f062c47 100644 --- a/source/tanya/math/mp.d +++ b/source/tanya/math/mp.d @@ -393,7 +393,9 @@ struct Integer T opCast(T)() const if (isIntegral!T && isSigned!T) { - return this.sign ? -(cast(Unsigned!T) this) : cast(Unsigned!T) this; + return this.sign + ? cast(T) -(cast(Promoted!(Unsigned!T)) (cast(Unsigned!T) this)) + : cast(Unsigned!T) this; } /// @@ -1072,7 +1074,7 @@ struct Integer assert(h1 == 79); h2 = ~h1; - assert(h2 == ~cast(ubyte) 79); + assert(h2 == cast(ubyte) ~79); } /// ditto -- cgit v1.2.3