mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-21 19:29:03 +02:00
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
This commit is contained in:
29
tests/minicomplex/constructors.d
Normal file
29
tests/minicomplex/constructors.d
Normal file
@@ -0,0 +1,29 @@
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user