Moving back to .NET

bitwise via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 20 18:49:26 PDT 2015


On Sunday, 20 September 2015 at 17:39:46 UTC, Andrei Alexandrescu 
wrote:
> Off the top of your head, can you list a few of the worst error 
> messages you've encountered?

Fine in release mode, error in debug mode:

struct S { int value; }

void main(string[] args) {
     Array!S stuff = [S(3), S(1), S(2)];
     stuff[].sort!((ref S a, ref S b) => a.value < b.value);
}

std/range/package.d(7180,24): Error: 
'std.range.SortedRange!(RangeT!(Array!(S)), 
__lambda2).SortedRange.dbgVerifySorted' is not nothrow
std/algorithm/sorting.d(982,29): Error: template instance 
std.range.assumeSorted!(__lambda2, RangeT!(Array!(S))) error 
instantiating
main.d(75,9):  instantiated from here: sort!(function (ref S a, 
ref S b) => a.value < b.value, cast(SwapStrategy)0, 
RangeT!(Array!(S)))

     Bit



More information about the Digitalmars-d mailing list