From 6a6dff40047322184ad83e3f600d28ef28ed5e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B3=D9=84=D9=8A=D9=85=D8=A7=D9=86=20=D8=A7=D9=84=D8=B3?= =?UTF-8?q?=D9=87=D9=85=D9=8A=20=20=28Suleyman=20Sahmi=29?= Date: Sun, 26 May 2019 02:17:07 +0000 Subject: [PATCH] Ternary operator doesn't promote characters to integers anymore --- std/range/package.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/std/range/package.d b/std/range/package.d index 19f33da47..94e3757ff 100644 --- a/std/range/package.d +++ b/std/range/package.d @@ -1274,8 +1274,8 @@ pure @safe nothrow unittest auto s3 = "string three".byCodeUnit; static assert(is(typeof(s3.front) == immutable char)); auto r2 = s1.chain(s3); - // type is promoted - static assert(is(typeof(r2.front) == uint)); + //// chaining ranges of mixed character types gives `dchar` + //static assert(is(typeof(r2.front) == dchar)); // use byChar on character ranges to correctly convert them to UTF-8 auto r3 = s1.byChar.chain(s3);