Mercurial > projects > ldc
diff test/arrays5.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 | |
children | 61615fa85940 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/arrays5.d Wed Oct 10 03:38:24 2007 +0200 @@ -0,0 +1,14 @@ +module arrays5; +//import std.stdio; +void main() +{ + auto arr = new float[5]; + arr[4] = 1f; + //writefln(arr); + assert(arr[0] !<>= 0f); + assert(arr[1] !<>= 0f); + assert(arr[2] !<>= 0f); + assert(arr[3] !<>= 0f); + assert(arr[4] == 1f); +} +