[Issue 3067] std.range.chain returns a range of wrong type elements

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 6 05:50:38 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3067



--- Comment #3 from Haruki Shigemori <rayerd.wiz at gmail.com> 2010-08-06 05:50:36 PDT ---
(In reply to comment #2)
> This is a bug in the compiler. Consider:
> 
> import std.stdio;
> void main()
> {
>     auto x = true ? ("a".dup)[0] : "b"[0];
>     writeln(typeof(x).stringof);
> }
> 
> This program prints int, meaning that the common type of a char and
> immutable(char) is int. It should be char.
> 
> I'm reassigning this to Walter.


As Andrei said, This issue was not a bug of phobos, but this is a bug of
conditional operator.
Is it difficult to fix?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list