1 // REQUIRED_ARGS: -o-
2 
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/failattr.d(16): Error: variable failattr.C2901.v1 cannot be synchronized
7 fail_compilation/failattr.d(17): Error: variable failattr.C2901.v2 cannot be override
8 fail_compilation/failattr.d(18): Error: variable failattr.C2901.v3 cannot be abstract
9 fail_compilation/failattr.d(19): Error: variable failattr.C2901.v4 cannot be final, perhaps you meant const?
10 fail_compilation/failattr.d(31): Error: variable failattr.C2901.v13 cannot be final abstract synchronized override
11 fail_compilation/failattr.d(33): Error: variable failattr.C2901.v14 cannot be final, perhaps you meant const?
12 ---
13 */
14 class C2901
15 {
16     synchronized    int v1;         // error
17     override        int v2;         // error
18     abstract        int v3;         // error
19     final           int v4;         // error
20 
21     synchronized    { int v5; }     // no error
22     override        { int v6; }     // no error
23     abstract        { int v7; }     // no error
24     final           { int v8; }     // no error
25 
26     synchronized:   int v9;         // no error
27     override:       int v10;        // no error
28     abstract:       int v11;        // no error
29     final:          int v12;        // no error
30 
31     synchronized override abstract final int v13;   // one line error
32 
33     static final int v14;           // error, even if static is applied at the same time
34 }
35