Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag7050a.d(15): Error: `@safe` function `diag7050a.foo` cannot call `@system` constructor `diag7050a.Foo.this`
5 fail_compilation/diag7050a.d(11): `diag7050a.Foo.this` is declared here
6 ---
7 */
8
9 struct Foo
10 {
11 this (int a) {}
12 }
13 @safe void foo()
14 {
15 auto f = Foo(3);
16 }