[Issue 18092] takeExactly cannot deduce function from generic forward range
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 17 03:40:51 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=18092
--- Comment #1 from Seb <greensunny12 at gmail.com> ---
Sorry just for posterity, the code sample should be:
```
import std.algorithm.comparison : equal;
import std.internal.test.dummyrange;
alias Range = DummyRange!(ReturnBy.Reference, Length.No, RangeType.Forward);
Range r;
assert(r.take(6).takeExactly(2).equal([1, 2]));
```
with the following error message:
range/package.d(2399): Error: cannot implicitly convert expression this._input
of type Take!(DummyRange!(cast(ReturnBy)0, cast(Length)1, cast(RangeType)1,
uint[])) to DummyRange!(cast(ReturnBy)0, cast(Length)1, cast(RangeType)1,
uint[])
range/package.d(2564): Error: template instance
std.range.takeExactly!(Take!(DummyRange!(cast(ReturnBy)0, cast(Length)1,
cast(RangeType)1, uint[]))) error instantiating
--
More information about the Digitalmars-d-bugs
mailing list