mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-17 21:33:13 +01:00
Make static int[] a = [1, 2]; a[0] = 4; not segfault
by making the array data ptr a non-const global variable.
This commit is contained in:
9
tests/mini/mutablearrayinit.d
Normal file
9
tests/mini/mutablearrayinit.d
Normal file
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user