Merge pull request #7041 from SSoulaimane/fix17141

Ternary operator no longer promotes characters to integers
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
This commit is contained in:
The Dlang Bot 2019-05-26 06:05:18 +02:00 committed by GitHub
commit ae7803260b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);