Switch ignores case (?)

Chris via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Nov 24 01:56:25 PST 2016


On Wednesday, 23 November 2016 at 22:13:38 UTC, ketmar wrote:
> On Wednesday, 23 November 2016 at 22:00:58 UTC, Steven 
> Schveighoffer wrote:
>> I can't see why you need to deal with the glue layer at all -- 
>> just tell the glue layer that it's a list of strings and not 
>> dstrings ;)
>
> 'cause that is how s2ir.d is done in dmd. ;-) it actually sorts 
> *objects*, and objects knows how to order 'emselves. at this 
> stage it is not trivial to treat objects as byte arrays (easy, 
> but not a one-liner).
>
> sure, other compilers may do that differently, and it doesn't 
> really matter how exactly the code for switch is generated 
> until it works correctly. ;-)

Great job, ketmar! I'm only surprised that this bug wasn't 
discovered earlier, I mean it goes back to (at least) dmd 2.040.


More information about the Digitalmars-d-learn mailing list