annotate tangotests/constructors.d @ 293:ebfa488f4abc trunk

[svn r314] Get correct value type for newing of multidimensional dynamic arrays. Fixes array_initialization_26_E.
author ChristianK
date Sun, 22 Jun 2008 15:21:34 +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 }