Mercurial > projects > ldc
annotate tests/mini/bug10.d @ 1606:1b24e9c7cc26
Use just \n as end of line
---
dmd/arraytypes.h | 102 ++++----
dmd/enum.c | 652 ++++++++++++++++++++++++++--------------------------
dmd/parse.h | 292 ++++++++++++------------
dmd/staticassert.c | 240 ++++++++++----------
4 files changed, 643 insertions(+), 643 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:19 -0300 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
40 | 1 module bug10; |
270
d9d5d59873d8
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents:
40
diff
changeset
|
2 extern(C) int printf(char*, ...); |
d9d5d59873d8
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents:
40
diff
changeset
|
3 |
40 | 4 class C |
5 { | |
6 char[] msg; | |
7 | |
8 this() | |
9 { | |
10 } | |
11 this(char[] msg) | |
12 { | |
13 this.msg = msg; | |
14 } | |
15 } | |
16 | |
17 void main() | |
18 { | |
19 auto c = new C(); | |
20 c.msg = "world"; | |
21 auto b = new C("hello"); | |
22 printf("%.*s\n", b.msg.length, b.msg.ptr); | |
23 printf("%.*s\n", c.msg.length, c.msg.ptr); | |
24 } |