diff options
Diffstat (limited to 'gcc/testsuite/gdc.test/fail_compilation/test21204.d')
-rw-r--r-- | gcc/testsuite/gdc.test/fail_compilation/test21204.d | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test21204.d b/gcc/testsuite/gdc.test/fail_compilation/test21204.d new file mode 100644 index 00000000000..8732cc09c23 --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/test21204.d @@ -0,0 +1,23 @@ +// https://issues.dlang.org/show_bug.cgi?id=21204 +/* +TEST_OUTPUT: +--- +fail_compilation/test21204.d(22): Error: Generating an `inout` copy constructor for `struct test21204.B` failed, therefore instances of it are uncopyable +--- +*/ + +struct A +{ + this(ref A other) {} +} + +struct B +{ + A a; +} + +void example() +{ + B b1; + B b2 = b1; +} |