Mercurial > projects > ldc
comparison test/arrays4.d @ 37:77cdca8c210f trunk
[svn r41] new'd dynamic arrays are now initialized with the element type's default initializer.
initial label/goto support.
author | lindquist |
---|---|
date | Wed, 10 Oct 2007 03:38:24 +0200 |
parents | c0967c4b2a74 |
children | 8b0e809563df |
comparison
equal
deleted
inserted
replaced
36:c0967c4b2a74 | 37:77cdca8c210f |
---|---|
1 module arrays4; | 1 module arrays4; |
2 | 2 |
3 void main() | 3 void main() |
4 { | 4 { |
5 auto arr = new int[4]; | 5 auto arr = new int[4]; |
6 {auto arrcat = arr ~ arr;} | 6 auto arrcat = arr ~ arr; |
7 assert(arrcat.length == arr.length * 2); | |
7 } | 8 } |
9 |