Hello,

I would do something like this, but this return me an execution error :
object.Exception: Stack Overflow

// --------CODE--------
class A
{
 void delegate() dg;

 void doIt()
 {
  dg();
 }
}

class B
{
 A a;

 this()
 {
  a = new A;
  a.dg = { doSomething(); };
 }

 void doSomething() { }
}

void main()
{
 auto b = new B;
 b.a.doIt();
}
// ------END CODE------

Is this a bug or have I do something wrong ?
Thanks in advance for your help,
TSalm

Reply via email to