June 26, 2003
dmd 0.67 on Linux

PROBLEM:
When I use an associative array where the index type is an array of class references, I get the undefined reference when linking the file.

EXAMPLE CODE:


class foo {};
uint[foo[]] lookup;

int main(char[][] args)
{
  foo[] array;

  array.length = 10;
  lookup[array] = 3;

  return 0;
}



Isn't it way cool that such a thing is even conceivable???  I LOVE D!!!

June 27, 2003
Russ Lewis wrote:

> dmd 0.67 on Linux
> 
> PROBLEM:
> When I use an associative array where the index type is an array of class references, I get the undefined reference when linking the file.

DLI generated TypeInfo objects as needed, but DMD only uses a small core set stored in Phobos.  For associative arrays, the TypeInfo is used for comparing items to hash them properly.  It's a bug, it's just well-known.