diff test/bug3.d @ 28:1c80c18f3c82 trunk

[svn r32] * Fixed problems with arrays members of aggregates
author lindquist
date Thu, 04 Oct 2007 12:49:37 +0200
parents
children 253a5fc4033a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/bug3.d	Thu Oct 04 12:49:37 2007 +0200
@@ -0,0 +1,16 @@
+module bug3;
+
+struct S
+{
+    int[] arr;
+    char[5] ch;
+}
+
+void main()
+{
+    S s;
+    s.arr = new int[5];
+    s.arr[1] = 32;
+    assert(s.arr[0] == 0);
+    assert(s.arr[1] == 32);
+}