AA struct hashing bug?

Random D user via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Dec 7 10:48:18 PST 2015


struct Foo
{
     this( int k )
     {
         a = k;
     }
     int a;
}

Foo foo;
int[ Foo ] map;

map[ foo ] = 1;  // Crash! bug?

// This also crashes. I believe crash above makes a call like 
this (or similar) in the rt.
//auto h = typeid( foo ).getHash( &foo ); // Crash!

win64 & dmd 2.69.2


More information about the Digitalmars-d-learn mailing list