getHash inconsistency
Daniel Murphy
yebblies at nospamgmail.com
Mon Mar 19 23:07:12 PDT 2012
"H. S. Teoh" <hsteoh at quickfur.ath.cx> wrote in message
news:mailman.910.1332214803.4860.digitalmars-d at puremagic.com...
> Is this a bug?
>
> char[] a = "abc".dup;
> const(char)[] b = "abc";
> string c = "abc";
>
> writeln(typeid(a).getHash(&a)); // 12914
> writeln(typeid(b).getHash(&b)); // 8503969683799911018
> writeln(typeid(c).getHash(&c)); // 12914
>
Of course.
More information about the Digitalmars-d
mailing list