getHash inconsistency

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Mar 19 20:41:27 PDT 2012


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


T

-- 
Obviously, some things aren't very obvious.


More information about the Digitalmars-d mailing list