[Issue 5853] New: Sorting SysTime: overlapping array copy
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 18 11:21:52 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5853
Summary: Sorting SysTime: overlapping array copy
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: Jesse.K.Phillips+D at gmail.com
CC: Jesse.K.Phillips+D at gmail.com
--- Comment #0 from Jesse Phillips <Jesse.K.Phillips+D at gmail.com> 2011-04-18 11:18:17 PDT ---
Sorting std.datetime.SysTime with std.algorithm.sort results in:
object.Exception at src\rt\arraycat.d(40): overlapping array copy
import std.algorithm;
import std.datetime;
import std.array;
void main() {
auto arr = [
SysTime(DateTime(2011,4,4)),
SysTime(DateTime(2011,3,22))
];
auto ans = [
SysTime(DateTime(2011,3,22)),
SysTime(DateTime(2011,4,4))
];
assert(array(sort(arr)) == ans);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list