fix Issue 5854 - Built-in array sort doesn't sort SysTime correctly#3670
fix Issue 5854 - Built-in array sort doesn't sort SysTime correctly#3670WalterBright merged 3 commits intodlang:masterfrom dcarp:fix5854
Conversation
|
Link: https://issues.dlang.org/show_bug.cgi?id=5854 |
|
The issue was about std.datetime module so the test was accordingly. |
This is a requirement for new tests |
|
How do I get the auto-tester verify this PR? |
Somebody with access needs to white list you AFAIK. |
I've added you to the whitelist. |
Thank you! |
|
Auto-merge toggled on |
fix Issue 5854 - Built-in array sort doesn't sort SysTime correctly
|
This seems to have broken on GDC (we pass arguments in reverse to DMD) - probably related to a recent thread on the NG too. |
That is to say, GDC passes them in the right order, DMD passes them in reverse. :o) |
It's somehow crucially affected by the params order imposed by the ABI (being a static D function). Such totally not ABI-agnostic code should most likely not be in the front-end, certainly not when auto-generating functions there. See dlang/dmd#3670, it caused problems for GDC too. This hack will only work for x86_64, all other platforms will most likely get a reversed ordering.
Add __builtins.d to be imported by ImportC modules
When creating the adaption of
int opCmp(in S other) constto be called asint opCmp(ref const S other) constthe compare parameters need to be reversed, otherwisearray.sortwill sort descending.