Comment #0 by john.loughran.colvin — 2014-07-17T10:59:23Z
unittest
{
auto r = take(repeat(1, 4), 3);
assert(r.equal(repeat(1, 3)));
}
fails to compile due to typeof(r) satisfying both
isInputRange!(Unqual!R) && !isInfinite!(Unqual!R) && hasSlicing!(Unqual!R)
and
is(R T == Take!T)
Note that this isn't triggered by using an array. is(typeof(take(slice)) == typeof(slice))
Comment #1 by john.loughran.colvin — 2014-07-17T11:08:28Z
woops, that should be
unittest
{
auto r = take(repeat(1, 4), 3);
assert(r.take(2).equal(repeat(1, 2)));
}
Comment #2 by john.loughran.colvin — 2014-07-17T14:06:10Z