Associative array with duplicated keys?

Andrea Fontana via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Nov 5 02:04:00 PST 2015


On Thursday, 5 November 2015 at 09:27:35 UTC, tcak wrote:
> On Thursday, 5 November 2015 at 08:55:10 UTC, Andrea Fontana 
> wrote:
>> Check this:
>> http://dpaste.dzfl.pl/ebbb3ebac60e
>>
>> It doesn't give any error or warning. And writeln seems 
>> confused (do you see that "," at the end?)
>
> I am sure the coder of writeln was lazy to prevent putting ", " 
> after last item. You can report it as a bug I guess.

Not really: it appears only if array has duplicated keys.

Anyway: are duplicated keys on declaration allowed?


More information about the Digitalmars-d-learn mailing list