4 fail_compilation/fail14304.d(26): Error: cannot modify read-only constant S14304(1)
5 fail_compilation/fail14304.d(58): called from here: sle14304.modify()
6 fail_compilation/fail14304.d(35): Error: cannot modify read-only constant [1:1, 2:2]
7 fail_compilation/fail14304.d(61): called from here: modify14304(aae14304)
8 fail_compilation/fail14304.d(41): Error: cannot modify read-only constant [1, 2, 3]
9 fail_compilation/fail14304.d(64): called from here: modify14304(cast(const(int)[])index14304)
10 fail_compilation/fail14304.d(47): Error: cannot modify read-only constant [1.414, 1.732, 2.00000]
11 fail_compilation/fail14304.d(67): called from here: modify14304(cast(const(double)[])slice14304)
12 fail_compilation/fail14304.d(53): Error: cannot modify read-only string literal "abc"
13 fail_compilation/fail14304.d(70): called from here: modify14304(cast(const(char)[])str14304)
25 // This force modification must not affect to ghe s14304 value.
26 (cast(S14304*)&this).x = 10;
32 int modify14304(immutable int[int] aa)
34 auto p = cast(int*)&aa[1];
38 int modify14304(const(int)[] arr)
40 auto a = cast(int[])arr;
44 int modify14304(const(double)[] arr)
46 auto a = cast(double[])arr;
48 return cast(int)arr[0];
50 int modify14304(const(char)[] str)
52 auto s = cast(char[])str;
57 static immutable sle14304 = immutable S14304(1);
58 static immutable v14304 = sle14304.modify();
60 static immutable aae14304 = [1:1, 2:2];
61 static immutable w14304 = modify14304(aae14304);
63 static immutable index14304 = [1, 2, 3];
64 static immutable x14304 = modify14304(index14304);
66 static immutable slice14304 = [1.414, 1.732, 2];
67 static immutable y14304 = modify14304(slice14304);
69 static immutable str14304 = "abc";
70 static immutable z14304 = modify14304(str14304);