Skip to content

Commit

Permalink
Merge pull request #2028 from Infiltrator/patch-1
Browse files Browse the repository at this point in the history
 Issue 5870 - Debug code in SortedRange assumes it can always print the ...
  • Loading branch information
andralex committed Mar 20, 2014
2 parents 9404dd4 + 3fe27f4 commit 2644eb9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion std/range.d
Expand Up @@ -8370,7 +8370,14 @@ if (isRandomAccessRange!Range && hasLength!Range)
static MinstdRand gen;
immutable start = uniform(0, step, gen);
auto st = stride(this._input, step);
assert(isSorted!pred(st), text(st));
static if (is(typeof(text(st))))
{
assert(isSorted!pred(st), text(st));
}
else
{
assert(isSorted!pred(st));
}
}
}

Expand Down

0 comments on commit 2644eb9

Please sign in to comment.