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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 27 23:03:46 PDT 2009


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


Andrei Alexandrescu <andrei at metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|andrei at metalanguage.com     |bugzilla at digitalmars.com




--- Comment #2 from Andrei Alexandrescu <andrei at metalanguage.com>  2009-08-27 23:03:45 PDT ---
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.

-- 
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