Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/test21198.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=21198
2
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/test21198.d(23): Error: generating an `inout` copy constructor for `struct test21198.U` failed, therefore instances of it are uncopyable
7 ---
8 */
9
10 struct S
11 {
12 this(ref inout(S) other) inout {}
13 }
14
15 union U
16 {
17 S s;
18 }
19
20 void fun()
21 {
22 U original;
23 U copy = original;
24 }