Interface/abstract constructors

useo unknown at unknown.com
Mon May 16 12:32:43 PDT 2011


Hey guys,

is there any chance to create an abstract constructor like:

abstract class ABC {

   abstract this();

}

DMD always says "...this non-virtual functions cannot be abstract" -
when I use an interface like:

interface ABC {

   this();

}

I get a similar error: "...constructors, destructors, postblits,
invariants, unittests, new and delete functions are not allowed in
interface ABC"

Is there any solution or is it possible to create such inheritances
in DMD?


More information about the Digitalmars-d-learn mailing list