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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 13 12:52:18 PDT 2009


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

           Summary: std.range.chain returns a range of wrong type elements
           Product: D
           Version: 2.030
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: rayerd.wiz at gmail.com


import std.stdio;
import std.algorithm;
import std.range;

void main()
{
    f(chain("a")); // immutable(char) <- OK
    f(chain("a".dup)); // char <-------- ?
    f(chain("a".dup, "b")); // int <---- NG
}

void f(Range)(Range r)
{
    writeln(typeid(ElementType!(Range)));
}

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