Class inheritance bug

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Nov 10 15:58:43 PST 2011


On 11/11/11, Tobias M. <tobias.m at onlinehome.de> wrote:
> Hi,
> i first had this bug:
> -------main.d-------
> import std.socket;
> class Foo : Address {
> }
> void main() {
> }
> -------END-------
> that lead to several undefined symbols when linking.

I can recreate this.

> But now i have this:
> -------main.d-------
> import core.thread;
> class Foo : Thread {
> }
> void main() {
> }
> -------END-------
> And i get an undefined symbol, again.

That shouldn't even compile. I need to call Thread's ctor, otherwise I get:
Error: constructor test.Foo.this no match for implicit super() call in
constructor

This compiles fine though:
class Foo : Thread {
     this() { super( &run ); }
     void run() {}
}


More information about the Digitalmars-d mailing list