mirror of
https://github.com/dlang/phobos.git
synced 2025-05-01 23:50:31 +03:00
Out-of-bounds error in algorithm.sort assertion message.
This commit is contained in:
parent
590b6a113c
commit
858e1ce747
1 changed files with 2 additions and 1 deletions
|
@ -6180,7 +6180,8 @@ sort(alias less = "a < b", SwapStrategy ss = SwapStrategy.unstable,
|
|||
enum maxLen = 8;
|
||||
assert(isSorted!lessFun(r), text("Failed to sort range of type ",
|
||||
Range.stringof, ". Actual result is: ",
|
||||
r[0 .. maxLen], r.length > maxLen ? "..." : ""));
|
||||
r[0 .. min($, maxLen)],
|
||||
r.length > maxLen ? "..." : ""));
|
||||
}
|
||||
else
|
||||
assert(isSorted!lessFun(r), text("Unable to sort range of type ",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue