Why D is annoying =P

Timon Gehr timon.gehr at gmx.ch
Wed Oct 24 12:25:46 PDT 2012


On 10/24/2012 09:17 PM, Mehrdad wrote:
> I couldn't find a better title, sorry.
>
>
> But yeah, I've spent too many hours on hunting down problems like these...
>
>
> Could someone explain what's going on? Thanks!
>
> import std.stdio;
> struct S { int[int] aa; }
> void main()
> {
>      writeln(  [1: 2]  ==   [1: 2] );  // true
>      writeln(S([1: 2]) == S([1: 2]));  // false
> }
>
> (I'm on Windows DMD v2.060.)

http://d.puremagic.com/issues/show_bug.cgi?id=3789


More information about the Digitalmars-d mailing list