1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/parse12967a.d(14): Error: function parse12967a.pre_i1 without 'this' cannot be immutable
5 fail_compilation/parse12967a.d(15): Error: function parse12967a.pre_i2 without 'this' cannot be immutable
6 fail_compilation/parse12967a.d(16): Error: function parse12967a.pre_c1 without 'this' cannot be const
7 fail_compilation/parse12967a.d(17): Error: function parse12967a.pre_c2 without 'this' cannot be const
8 fail_compilation/parse12967a.d(18): Error: function parse12967a.pre_w1 without 'this' cannot be inout
9 fail_compilation/parse12967a.d(19): Error: function parse12967a.pre_w2 without 'this' cannot be inout
10 fail_compilation/parse12967a.d(20): Error: function parse12967a.pre_s1 without 'this' cannot be shared
11 fail_compilation/parse12967a.d(21): Error: function parse12967a.pre_s2 without 'this' cannot be shared
12 ---
13 */
pre_i1()14 immutable      pre_i1() {}
pre_i2()15 immutable void pre_i2() {}
pre_c1()16 const          pre_c1() {}
pre_c2()17 const     void pre_c2() {}
pre_w1()18 inout          pre_w1() {}
pre_w2()19 inout     void pre_w2() {}
pre_s1()20 shared         pre_s1() {}
pre_s2()21 shared    void pre_s2() {}
22 
23 /*
24 TEST_OUTPUT:
25 ---
26 fail_compilation/parse12967a.d(36): Error: function parse12967a.post_i1 without 'this' cannot be immutable
27 fail_compilation/parse12967a.d(37): Error: function parse12967a.post_i2 without 'this' cannot be immutable
28 fail_compilation/parse12967a.d(38): Error: function parse12967a.post_c1 without 'this' cannot be const
29 fail_compilation/parse12967a.d(39): Error: function parse12967a.post_c2 without 'this' cannot be const
30 fail_compilation/parse12967a.d(40): Error: function parse12967a.post_w1 without 'this' cannot be inout
31 fail_compilation/parse12967a.d(41): Error: function parse12967a.post_w2 without 'this' cannot be inout
32 fail_compilation/parse12967a.d(42): Error: function parse12967a.post_s1 without 'this' cannot be shared
33 fail_compilation/parse12967a.d(43): Error: function parse12967a.post_s2 without 'this' cannot be shared
34 ---
35 */
post_i1()36 auto post_i1() immutable {}
post_i2()37 void post_i2() immutable {}
post_c1()38 auto post_c1() const     {}
post_c2()39 void post_c2() const     {}
post_w1()40 auto post_w1() inout     {}
post_w2()41 void post_w2() inout     {}
post_s1()42 auto post_s1() shared    {}
post_s2()43 void post_s2() shared    {}
44