If I derive a class from Gtk.Window like this:
class Derived : Window {
this (string n) { super (n); b = 10; }
private:
invariant () { assert ( b > 0 ); }
int b;
}
When creating a Derived object, the Derived.invariant is called inside the "super (n)" call ... and as 'Derived.b' isn't initialized yet...it gives an error!
If I change the base class from Gtk.Window to another class (a class written by me) like:
class Base {
this (string n) { name = n; }
private string name;
}
The DbC works as expected.
Am I missing something here?
Thanks for your hellp