Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag7050c.d(14): Error: `@safe` destructor `diag7050c.B.~this` cannot call `@system` destructor `diag7050c.A.~this`
5 fail_compilation/diag7050c.d(11): `diag7050c.A.~this` is declared here
6 ---
7 */
8
9 struct A
10 {
11 ~this(){}
12 }
13
14 @safe struct B
15 {
16 A a;
17 }
18
19 @safe void f()
20 {
21 auto x = B.init;
22 }