comparison 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
comparison
equal deleted inserted replaced
1291:875afb7a93b6 1292:ad41053c336e
1 void main()
2 {
3 static int[] b = [1, 2];
4 b[0] = 2;
5
6 typedef int[] ia = [1,2];
7 static ia a;
8 a[0] = 5;
9 }