April 14, 2002 null initializer bug | ||||
---|---|---|---|---|
| ||||
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. |
April 14, 2002 Re: null initializer bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pavel Minayev | 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. > > |
Copyright © 1999-2021 by the D Language Foundation