]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/test15704.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test15704.d
1 /*
2 * TEST_OUTPUT:
3 ---
4 fail_compilation/test15704.d(15): Error: cannot copy `void[]` to `void[]` in `@safe` code
5 ---
6 */
7
8 // https://issues.dlang.org/show_bug.cgi?id=15704
9
10 void main() @safe {
11 Object[] objs = [ new Object() ];
12 void[] arr1 = objs;
13 void[] arr2 = [ 123, 345, 567 ];
14
15 arr1[] = arr2[]; // overwrites pointers with arbitrary ints
16 }
17