annotate tangotests/constructors.d @ 270:d9d5d59873d8 trunk

[svn r291] Fixed a bunch of the old Phobos tests to work with Tango. Branch statements now emit a new block after it. Fixed the _adSort runtime function had a bad signature. Added a missing dot prefix on compiler generated string tables for string switch. Fixed, PTRSIZE seems like it was wrong on 64bit, now it definitely gets set properly.
author lindquist
date Mon, 16 Jun 2008 16:01:19 +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 }