view test/classes8.d @ 40:8b0e809563df trunk

[svn r44] Lots of bug fixes. New array literal support New array ~= operator support (for single element) New with statement support More...
author lindquist
date Fri, 19 Oct 2007 07:43:21 +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() {
}