[Issue 4264] Various std.algorithm.map problems

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 15 16:24:19 PDT 2010


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



--- Comment #1 from bearophile_hugs at eml.cc 2010-07-15 16:24:16 PDT ---
Another case, I don't know the cause of the problem:


import std.algorithm, std.conv, std.range;
void main() {
    auto r1 = map!(to!(int, string))(iota(20));
}


dmd v2.047 prints:
...\dmd\src\phobos\std\algorithm.d(115): Error: function
std.conv.to!(int,string).to (string value) is not callable using argument types
(uint)
...\dmd\src\phobos\std\algorithm.d(115): Error: cannot implicitly convert
expression (0u) of type uint to string


If I replace int with uint:

import std.algorithm, std.conv, std.range;
void main() {
    auto r1 = map!(to!(uint, string))(iota(20));
}


...\dmd\src\phobos\std\algorithm.d(115): Error: function
std.conv.to!(uint,string).to (string value) is not callable using argument
types (uint)
...\dmd\src\phobos\std\algorithm.d(115): Error: cannot implicitly convert
expression (0u) of type uint to string

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