Files
ldc/tests/d1/minicomplex/constructors.d
2012-09-07 03:51:31 +02:00

32 lines
360 B
D

module constructors;
import tango.io.Console;
class C
{
this()
{
Cout("C()").newline;
}
this(char[] str)
{
Cout("C(")(str)(")").newline;
}
}
class D : C
{
this()
{
super("D");
Cout("D()").newline;
}
}
void main()
{
auto c1 = new C();
auto c2 = new C("C");
auto d = new D();
}