annotate tangotests/constructors.d @ 172:68a7dd38c03c trunk

[svn r188] Fixed using a dereferenced pointer argument as both l- and r-value. fixes tango.io.FileRoots. Reorganized the tangotests dir a bit.
author lindquist
date Tue, 06 May 2008 07:26:27 +0200
parents b77664331d06
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
160
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
1 import tango.io.Console;
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
2
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
3 class C
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
4 {
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
5 this()
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
6 {
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
7 Cout("C()").newline;
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
8 }
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
9 this(char[] str)
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
10 {
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
11 Cout("C(")(str)(")").newline;
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
12 }
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
13 }
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
14
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
15 class D : C
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
16 {
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
17 this()
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
18 {
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
19 super("D");
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
20 Cout("D()").newline;
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
21 }
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
22 }
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
23
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
24 void main()
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
25 {
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
26 auto c1 = new C();
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
27 auto c2 = new C("C");
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
28 auto d = new D();
b77664331d06 [svn r176] Fixed a bug with class constructors.
lindquist
parents:
diff changeset
29 }