Debian Codegraph @

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

raw
1 /*
2 REQUIRED_ARGS: -unittest
3 TEST_OUTPUT:
4 ---
5 fail_compilation/fail14249.d(21): Error: `shared static` constructor can only be member of module/aggregate/template, not function `main`
6 fail_compilation/fail14249.d(22): Error: `shared static` destructor can only be member of module/aggregate/template, not function `main`
7 fail_compilation/fail14249.d(23): Error: `static` constructor can only be member of module/aggregate/template, not function `main`
8 fail_compilation/fail14249.d(24): Error: `static` destructor can only be member of module/aggregate/template, not function `main`
9 fail_compilation/fail14249.d(25): Error: `unittest` can only be a member of module/aggregate/template, not function `main`
10 fail_compilation/fail14249.d(26): Error: `invariant` can only be a member of aggregate, not function `main`
11 fail_compilation/fail14249.d(27): Error: alias this can only be a member of aggregate, not function `main`
12 fail_compilation/fail14249.d(28): Error: constructor can only be a member of aggregate, not function `main`
13 fail_compilation/fail14249.d(29): Error: destructor can only be a member of aggregate, not function `main`
14 fail_compilation/fail14249.d(30): Error: postblit can only be a member of struct, not function `main`
15 fail_compilation/fail14249.d(31): Error: anonymous union can only be a part of an aggregate, not function `main`
16 fail_compilation/fail14249.d(35): Error: mixin `fail14249.main.Mix!()` error instantiating
17 ---
18 */
19 mixin template Mix()
20 {
21 shared static this() {}
22 shared static ~this() {}
23 static this() {} // from fail197.d, 1510 ICE: Assertion failure: 'ad' on line 925 in file 'func.c'
24 static ~this() {}
25 unittest {}
26 invariant {}
27 alias a this;
28 this() {} // from fail268.d
29 ~this() {} // from fail268.d
30 this(this) {}
31 union { int x; double y; }
32 }
33 void main()
34 {
35 mixin Mix!();
36 }