Mercurial > projects > ldc
annotate test/memory1.d @ 314:8d98e42ece93 trunk
[svn r335] The basics of exception handling are in place.
Still need to make sure calls are turned into invokes everywhere. (NewExpression for instance)
Still some rough edges and corner cases to figure out.
Needs testing!
author | ChristianK |
---|---|
date | Wed, 02 Jul 2008 22:20:18 +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 } |