https://issues.dlang.org/show_bug.cgi?id=15459
Walter Bright <bugzi...@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED CC| |bugzi...@digitalmars.com Resolution|--- |WORKSFORME --- Comment #11 from Walter Bright <bugzi...@digitalmars.com> --- (In reply to Simon Naarmann from comment #0) > http://dpaste.dzfl.pl/ce501c212d32 > > This code calls byLine, each, map!somefunc. It compiles fine, but fails to > link. Tested on my Linux machine with DMD 2.069.2 and on dpaste with DMD > 2.069.1. > > Expected: Either an error during compilation, or a well-linked executable. > > Code copied here for convenience: > > #!/usr/bin/rdmd > > import std.stdio; > import std.algorithm; > > char somefunc(in char c) > { > return c; > } > > void main() > { > stdin > .byLine > .each!(map!somefunc); > } > > dmd outputs: I get: test.d(13): Error: template `std.algorithm.iteration.each!(map).each` cannot deduce function from argument types `!()(ByLine!(char, char))`, candidates are: c:\cbx\mars\phobos\std\algorithm\iteration.d(890): `std.algorithm.iteration.each!(map).each(Range)(Range r) if (!isForeachIterable!Range && (isRangeIterable!Range || __traits(compiles, typeof(r.front).length)))` c:\cbx\mars\phobos\std\algorithm\iteration.d(925): `std.algorithm.iteration.each!(map).each(Iterable)(auto ref Iterable r) if (isForeachIterable!Iterable || __traits(compiles, Parameters!(Parameters!(r.opApply))))` So it works for me. --