view test/classes8.d @ 31:2841234d2aea trunk

[svn r35] * Attributes on struct fields/methods now work * Updated object.d to 1.021 * Added -novalidate command line option. this is sometimes useful when debugging as it may let you read the .ll even if it's invalid.
author lindquist
date Thu, 04 Oct 2007 16:44:07 +0200
parents 37a4fdab33fc
children
line wrap: on
line source

class A {
    int i;
    int l;
    this(bool b,bool b2=false) {
        if (b) this = new B;
        i = 4;
        if (b2) this = new C;
        l = 64;
    }
}
class B : A{
    this() {
        super(false);
    }
}
class C : A{
    this() {
        super(false);
    }
}
void main() {
}