1 /* 2 TEST_OUTPUT: 3 --- 4 fail_compilation/parseStc2.d(11): Error: conflicting attribute `const` 5 fail_compilation/parseStc2.d(12): Error: conflicting attribute `@system` 6 fail_compilation/parseStc2.d(13): Error: conflicting attribute `@safe` 7 fail_compilation/parseStc2.d(14): Error: conflicting attribute `@trusted` 8 fail_compilation/parseStc2.d(15): Error: conflicting attribute `__gshared` 9 --- 10 */ f4()11immutable const void f4() {} f4()12@safe @system void f4() {} f4()13@trusted @safe void f4() {} f4()14@system @trusted void f4() {} f4()15shared __gshared f4() {} 16 17 /* 18 TEST_OUTPUT: 19 --- 20 fail_compilation/parseStc2.d(26): Error: redundant attribute `static` 21 fail_compilation/parseStc2.d(27): Error: redundant attribute `pure` 22 fail_compilation/parseStc2.d(28): Error: redundant attribute `@property` 23 fail_compilation/parseStc2.d(29): Error: redundant attribute `@safe` 24 --- 25 */ f1()26static static void f1() {} f2()27pure nothrow pure void f2() {} property(C)28@property extern(C) @property void f3() {} f4()29deprecated("") @safe @safe void f4() {} f5()30@(1) @(1) void f5() {} // OK 31 32 /* 33 TEST_OUTPUT: 34 --- 35 fail_compilation/parseStc2.d(39): Error: redundant linkage `extern (C)` 36 fail_compilation/parseStc2.d(40): Error: conflicting linkage `extern (C)` and `extern (C++)` 37 --- 38 */ f6()39extern(C) extern(C) void f6() {} f7()40extern(C) extern(C++) void f7() {} f8()41extern(C++, foo) extern(C++, bar) void f8() {} // OK 42 43 /* 44 TEST_OUTPUT: 45 --- 46 fail_compilation/parseStc2.d(50): Error: redundant protection attribute `public` 47 fail_compilation/parseStc2.d(51): Error: conflicting protection attribute `public` and `private` 48 --- 49 */ f9()50public public void f9() {} f10()51public private void f10() {} 52 53 /* 54 TEST_OUTPUT: 55 --- 56 fail_compilation/parseStc2.d(63): Error: redundant alignment attribute `align` 57 fail_compilation/parseStc2.d(64): Error: redundant alignment attribute `align(1)` 58 fail_compilation/parseStc2.d(65): Error: redundant alignment attribute `align(1)` 59 fail_compilation/parseStc2.d(66): Error: redundant alignment attribute `align` 60 fail_compilation/parseStc2.d(67): Error: redundant alignment attribute `align(2)` 61 --- 62 */ f11()63align align void f11() {} f12()64align(1) align(1) void f12() {} f13()65align align(1) void f13() {} f14()66align(1) align void f14() {} f15()67align(1) align(2) void f15() {} 68 69 /* 70 TEST_OUTPUT: 71 --- 72 fail_compilation/parseStc2.d(76): Error: redundant linkage `extern (System)` 73 fail_compilation/parseStc2.d(77): Error: conflicting linkage `extern (System)` and `extern (C++)` 74 --- 75 */ f16()76extern(System) extern(System) void f16() {} f17()77extern(System) extern(C++) void f17() {} 78