| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/test9701.d(38): Error: `@safe` is not a valid attribute for enum members |
| 5 |
fail_compilation/test9701.d(39): Error: `@system` is not a valid attribute for enum members |
| 6 |
fail_compilation/test9701.d(40): Error: `@trusted` is not a valid attribute for enum members |
| 7 |
fail_compilation/test9701.d(41): Error: `@nogc` is not a valid attribute for enum members |
| 8 |
fail_compilation/test9701.d(42): Error: found `pure` when expecting `identifier` |
| 9 |
fail_compilation/test9701.d(43): Error: found `shared` when expecting `identifier` |
| 10 |
fail_compilation/test9701.d(44): Error: found `inout` when expecting `identifier` |
| 11 |
fail_compilation/test9701.d(45): Error: found `immutable` when expecting `identifier` |
| 12 |
fail_compilation/test9701.d(46): Error: found `const` when expecting `identifier` |
| 13 |
fail_compilation/test9701.d(47): Error: found `synchronized` when expecting `identifier` |
| 14 |
fail_compilation/test9701.d(48): Error: found `scope` when expecting `identifier` |
| 15 |
fail_compilation/test9701.d(49): Error: found `auto` when expecting `identifier` |
| 16 |
fail_compilation/test9701.d(50): Error: found `ref` when expecting `identifier` |
| 17 |
fail_compilation/test9701.d(51): Error: found `__gshared` when expecting `identifier` |
| 18 |
fail_compilation/test9701.d(52): Error: found `final` when expecting `identifier` |
| 19 |
fail_compilation/test9701.d(53): Error: found `extern` when expecting `identifier` |
| 20 |
fail_compilation/test9701.d(54): Error: found `export` when expecting `identifier` |
| 21 |
fail_compilation/test9701.d(55): Error: found `nothrow` when expecting `identifier` |
| 22 |
fail_compilation/test9701.d(56): Error: found `public` when expecting `identifier` |
| 23 |
fail_compilation/test9701.d(57): Error: found `private` when expecting `identifier` |
| 24 |
fail_compilation/test9701.d(58): Error: found `package` when expecting `identifier` |
| 25 |
fail_compilation/test9701.d(59): Error: found `static` when expecting `identifier` |
| 26 |
fail_compilation/test9701.d(60): Error: found `static` when expecting `identifier` |
| 27 |
fail_compilation/test9701.d(61): Error: found `static` when expecting `identifier` |
| 28 |
fail_compilation/test9701.d(62): Error: found `static` when expecting `identifier` |
| 29 |
--- |
| 30 |
*/ |
| 31 |
|
| 32 |
// This test exists to verify that parsing of enum member attributes rejects invalid attributes |
| 33 |
|
| 34 |
// https://issues.dlang.org/show_bug.cgi?id=9701 |
| 35 |
|
| 36 |
enum Enum |
| 37 |
{ |
| 38 |
@safe safe, |
| 39 |
@system system, |
| 40 |
@trusted trusted, |
| 41 |
@nogc nogc, |
| 42 |
pure pure_, |
| 43 |
shared shared_, |
| 44 |
inout inout_, |
| 45 |
immutable immutable_, |
| 46 |
const const_, |
| 47 |
synchronized synchronized_, |
| 48 |
scope scope_, |
| 49 |
auto auto_, |
| 50 |
ref ref_, |
| 51 |
__gshared __gshared_, |
| 52 |
final final_, |
| 53 |
extern extern_, |
| 54 |
export export_, |
| 55 |
nothrow nothrow_, |
| 56 |
public public_, |
| 57 |
private private_, |
| 58 |
package package_, |
| 59 |
static static1, |
| 60 |
@("a") static static2, |
| 61 |
static @("a") static3, |
| 62 |
@("a") static @("b") static3, |
| 63 |
} |