http://d.puremagic.com/issues/show_bug.cgi?id=5835
Summary: Class array's TypeInfo.getHash doesn't work correctly Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara <k.hara...@gmail.com> 2011-04-11 05:52:31 PDT --- Sample code: ---- import std.stdio; class Foo{ hash_t toHash(){ writeln("Foo.toHash"); return 0; } } void main(){ Foo[] arr = [new Foo(), new Foo()]; typeid(arr).getHash(&arr); // doesn't call Foo.toHash() } ---- The typeid(arr) returns instance of TypeInfo_Array, but its getHash is not call Object.toHash of each element. The internal TypeInfo class rt.typeinfo.ti_AC.TypeInfo_AC supports it, but this is only used in array/associative-array operations. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------