[Issue 22002] New: std.algorithm.each breaks when used with InputRangeObject
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 7 18:11:16 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22002
Issue ID: 22002
Summary: std.algorithm.each breaks when used with
InputRangeObject
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: mipri at minimaltype.com
The following complete example
unittest {
import std.algorithm : each;
import std.range : only, inputRangeObject;
import std.stdio : writeln;
only(1, 2).inputRangeObject.each!writeln;
}
Fails with this error:
each.d(6): Error: `std.algorithm.iteration.each!(writeln).each` called with
argument types `(InputRangeObject!(OnlyResult!(int, int)))` matches both:
phobos/std/algorithm/iteration.d(953):
`std.algorithm.iteration.each!(writeln).each!(InputRangeObject!(OnlyResult!(int,
int))).each(InputRangeObject!(OnlyResult!(int, int)) r)`
and:
phobos/std/algorithm/iteration.d(1014):
`std.algorithm.iteration.each!(writeln).each!(InputRangeObject!(OnlyResult!(int,
int))).each(InputRangeObject!(OnlyResult!(int, int)) r)`
With DMD64 D Compiler v2.097.0
--
More information about the Digitalmars-d-bugs
mailing list