2.065 compiler problem

Ondrej Pokorny pokorny.ondrej at gmail.com
Wed Apr 2 14:58:55 PDT 2014


Hi I have following issue:
code:

import std.stdio;

import std.container;

alias HierarchyGraph HGraph;

class HierarchyGraph(T)
{
     T leaf;
     alias leaf data;

     HierarchyGraph parent = null;

private:

     Array!(HierarchyGraph) child;

}

int main(string[] argv)
{

     HGraph!int a0 = new HGraph!int();

     return 0;
}

Under 2.063 it compliles and runs.
Under 2.065 following error message given:

/usr/local/Cellar/dmd/2.065.0/import/std/traits.d(1948): Error: 
class main.HGraph!int.HierarchyGraph no size yet for forward 
reference
/usr/local/Cellar/dmd/2.065.0/import/std/traits.d(2108): Error: 
template instance std.traits.FieldTypeTuple!(HGraph!int) error 
instantiating
/usr/local/Cellar/dmd/2.065.0/import/std/traits.d(2715):        
instantiated from here: RepresentationTypeTuple!(HGraph!int)
/usr/local/Cellar/dmd/2.065.0/import/std/container.d(2511):       
  instantiated from here: hasIndirections!(HGraph!int)
main.d(17):        instantiated from here: Array!(HGraph!int)
main.d(24):        instantiated from here: HGraph!int
/usr/local/Cellar/dmd/2.065.0/import/std/traits.d(2715): Error: 
template instance std.traits.RepresentationTypeTuple!(HGraph!int) 
error instantiating
/usr/local/Cellar/dmd/2.065.0/import/std/container.d(2511):       
  instantiated from here: hasIndirections!(HGraph!int)
main.d(17):        instantiated from here: Array!(HGraph!int)
main.d(24):        instantiated from here: HGraph!int
/usr/local/Cellar/dmd/2.065.0/import/std/container.d(2511): 
Error: template instance std.traits.hasIndirections!(HGraph!int) 
error instantiating
main.d(17):        instantiated from here: Array!(HGraph!int)
main.d(24):        instantiated from here: HGraph!int
/usr/local/Cellar/dmd/2.065.0/import/std/container.d(2646): 
Error: template instance std.typecons.RefCounted!(Payload, 
cast(RefCountedAutoInitialize)0) error instantiating
main.d(17):        instantiated from here: Array!(HGraph!int)
main.d(24):        instantiated from here: HGraph!int
main.d(17): Error: template instance 
std.container.Array!(HGraph!int) error instantiating
main.d(24):        instantiated from here: HGraph!int
main.d(24): Error: template instance main.HGraph!int error 
instantiating

2.065 was installed with brew unde mac os lion.
2.063 from dmg package on this site

Any thoughts?
Thank you.




More information about the Digitalmars-d mailing list