Mercurial > projects > ldc
annotate test/memory1.d @ 176:a074a5ff709c trunk
[svn r192] Fixed: String literals as constant expression was broken for utf16/32.
author | lindquist |
---|---|
date | Wed, 07 May 2008 00:58:36 +0200 |
parents | 44a95ac7368a |
children |
rev | line source |
---|---|
34 | 1 module memory1; |
2 | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
34
diff
changeset
|
3 extern(C) int printf(char*,...); |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
34
diff
changeset
|
4 |
34 | 5 void main() |
6 { | |
7 auto a = new int[16]; | |
8 {printf("array.length = %u\n", a.length);} | |
9 {a.length = a.length + 1;} | |
10 {printf("array.length = %u\n", a.length);} | |
11 {assert(a.length == 17);} | |
12 } |