annotate test/bug10.d @ 58:2c3cd3596187
trunk
[svn r62] Added support for TypeInfo _Array, _Function, _Pointer, _Delegate, _Enum
Added initial support for CatExp aka 'a ~ b'
Fixed global constant static arrays initialized with string literals
Fixed casting any dynamic array to void*
Fixed new expression with temporary storage
Fixed alias declarations in function scope
Fixed relational comparisons of pointers
author |
lindquist |
date |
Thu, 25 Oct 2007 09:02:55 +0200 |
parents |
8b0e809563df |
children |
d9d5d59873d8 |
rev |
line source |
40
|
1 module bug10;
|
|
2 import std.stdio;
|
|
3 class C
|
|
4 {
|
|
5 char[] msg;
|
|
6
|
|
7 this()
|
|
8 {
|
|
9 }
|
|
10 this(char[] msg)
|
|
11 {
|
|
12 this.msg = msg;
|
|
13 }
|
|
14 }
|
|
15
|
|
16 void main()
|
|
17 {
|
|
18 auto c = new C();
|
|
19 c.msg = "world";
|
|
20 auto b = new C("hello");
|
|
21 printf("%.*s\n", b.msg.length, b.msg.ptr);
|
|
22 printf("%.*s\n", c.msg.length, c.msg.ptr);
|
|
23 }
|