D - null initializer bug
- "Pavel Minayev" <evilone omen.ru> Apr 14 2002
- "Walter" <walter digitalmars.com> Apr 14 2002
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
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








"Walter" <walter digitalmars.com>