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

--- Comment #0 from Kenji Hara <> 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:
------- You are receiving this mail because: -------

Reply via email to