diff tests/mini/mutablearrayinit.d @ 1292:ad41053c336e

Make static int[] a = [1, 2]; a[0] = 4; not segfault by making the array data ptr a non-const global variable.
author Christian Kamm <kamm incasoftware de>
date Sun, 03 May 2009 11:16:54 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/mini/mutablearrayinit.d	Sun May 03 11:16:54 2009 +0200
@@ -0,0 +1,9 @@
+void main()
+{
+  static int[] b = [1, 2];
+  b[0] = 2;
+  
+  typedef int[] ia = [1,2];
+  static ia a;
+  a[0] = 5;
+}
\ No newline at end of file