diff tests/mini/arrayinit2.d @ 914:a65a6996922f

Fixed bug #191 by rewriting DtoConstArrayInitializer, patch unfortunately caused regressions, hopefully this doesn't :P
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 01 Feb 2009 23:30:36 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/mini/arrayinit2.d	Sun Feb 01 23:30:36 2009 +0100
@@ -0,0 +1,10 @@
+// bug #191
+
+int[3] a = [0: 0, 2: 42, 1: 1];
+
+void main()
+{
+  assert(a[0] == 0);
+  assert(a[1] == 1); // fails!
+  assert(a[2] == 42);
+}