www.digitalmars.com         C & C++   DMDScript  

D - Alpha 4.2 bug

reply Patrick Down <pat codemoon.com> writes:
The following code causes the compiler to crash.

int main(char[][] argv)
{
  struct Test
  {
    int a;

    void func(int b)
    {
      a = b;
    }
  }

  void delegate(int) funDel;

  Test foo;
  
  funDel = &foo.func;
  
  funDel(12);
  
  printf("%d\n",foo.a);
  
  return 0;
}
Sep 25 2002
parent "Walter" <walter digitalmars.com> writes:
Thanks, I'll take care of it. -Walter
Sep 25 2002