Debian Codegraph @

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

raw
1
2 /*
3 TEST_OUTPUT:
4 ---
5 fail_compilation/parseStc4.d(14): Error: redundant attribute `pure`
6 fail_compilation/parseStc4.d(14): Error: redundant attribute `nothrow`
7 fail_compilation/parseStc4.d(14): Error: conflicting attribute `@system`
8 fail_compilation/parseStc4.d(14): Error: redundant attribute `@nogc`
9 fail_compilation/parseStc4.d(14): Error: redundant attribute `@property`
10 ---
11 */
12 pure nothrow @safe @nogc @property
13 int foo()
14 pure nothrow @system @nogc @property
15 {
16 return 0;
17 }
18
19 /*
20 TEST_OUTPUT:
21 ---
22 fail_compilation/parseStc4.d(35): Error: redundant attribute `const`
23 fail_compilation/parseStc4.d(36): Error: redundant attribute `const`
24 fail_compilation/parseStc4.d(36): Deprecation: `const` postblit is deprecated. Please use an unqualified postblit.
25 fail_compilation/parseStc4.d(37): Error: redundant attribute `const`
26 fail_compilation/parseStc4.d(39): Error: redundant attribute `pure`
27 fail_compilation/parseStc4.d(40): Error: redundant attribute `@safe`
28 fail_compilation/parseStc4.d(41): Error: redundant attribute `nothrow`
29 fail_compilation/parseStc4.d(42): Error: conflicting attribute `@trusted`
30 ---
31 */
32
33 struct S
34 {
35 const this(int) const {}
36 const this(this) const {}
37 const ~this() const {}
38
39 pure static this() pure {}
40 @safe static ~this() @safe {}
41 nothrow shared static this() nothrow {}
42 @system shared static ~this() @trusted {}
43 }