Harmonia and DMD 0.157

Andrew Fedoniouk news at terrainformatica.com
Sun May 14 00:32:29 PDT 2006


I have a template in Harmonia (code reduced):

struct array(T)
{
  T[] elements;
  ....
  struct ENUM // bidirectional enumerator
  {
    int opApply(int delegate(inout T) dg)  {  ...  }
  }

  ENUM items(bool forward) { ENUM w; w._forward = forward; w._a = elements; 
return w; }
  ENUM forward() { return items(true); }
  ENUM backward() { return items(false); }
}

And its instantiation in other module:

array!(Doc.Brick*) bricks;

Since DMD 0.157(probably 0.156 too) compilation is yelding to:

OPTLINK :
C:\d\build\lib\release\view.obj(view)  Offset 03958H Record Type 0091
Error 1: Previous Definition Different : 
__init_8harmonia5types46__T5arrayTPS8harmonia4html8document3Doc5BrickZ5array4ENUM

This is in Release mode, in Debug mode everything is fine.

I cannot understand how to solve this. Instantiation of array!(Doc.Brick*) 
is in single place and
I have no idea what "Previous Definition Different" means here.

If pattern looks familiar to somebody - please let me know as Harmonia is 
broken now.

Andrew.







More information about the Digitalmars-d mailing list