www.digitalmars.com         C & C++   DMDScript  

D - null initializer bug

reply "Pavel Minayev" <evilone omen.ru> writes:
It happens when you have a member of class explicitly initialized
to null, and there is a derived class in another module:

    // module foo.d
    class Foo
    {
        Object foo = null;
    }

    // module bar.d
    import Foo
    class Bar: Foo { }

Run and watch the compiler crash... dunno why this happens. If you
put both classes in one module, it doesn't, also works fine when,
say, int gets initialized by 0.
Apr 14 2002
parent "Walter" <walter digitalmars.com> writes:
Ok, I'll check into it. -Walter

"Pavel Minayev" <evilone omen.ru> wrote in message
news:a9bp37$12mh$1 digitaldaemon.com...
 It happens when you have a member of class explicitly initialized
 to null, and there is a derived class in another module:

     // module foo.d
     class Foo
     {
         Object foo = null;
     }

     // module bar.d
     import Foo
     class Bar: Foo { }

 Run and watch the compiler crash... dunno why this happens. If you
 put both classes in one module, it doesn't, also works fine when,
 say, int gets initialized by 0.

Apr 14 2002