mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-20 06:05:22 +02:00
Created separate tests directory for D1.
This commit is contained in:
31
tests/d1/minicomplex/constructors.d
Normal file
31
tests/d1/minicomplex/constructors.d
Normal file
@@ -0,0 +1,31 @@
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user