| 1 |
/* TEST_OUTPUT: |
| 2 |
--- |
| 3 |
fail_compilation/failcontracts.d(17): Error: missing `{ ... }` for function literal |
| 4 |
fail_compilation/failcontracts.d(17): Error: semicolon expected following auto declaration, not `bode` |
| 5 |
fail_compilation/failcontracts.d(18): Error: function declaration without return type. (Note that constructors are always named `this`) |
| 6 |
fail_compilation/failcontracts.d(18): Error: variable name expected after type `test1()`, not `bode` |
| 7 |
fail_compilation/failcontracts.d(18): Error: semicolon expected following function declaration, not `bode` |
| 8 |
fail_compilation/failcontracts.d(19): Error: semicolon expected following function declaration, not `bode` |
| 9 |
fail_compilation/failcontracts.d(21): Error: unexpected `(` in declarator |
| 10 |
fail_compilation/failcontracts.d(21): Error: found `T` when expecting `)` |
| 11 |
fail_compilation/failcontracts.d(21): Error: expected `{`, not `;` for enum declaration |
| 12 |
--- |
| 13 |
*/ |
| 14 |
|
| 15 |
void test() |
| 16 |
{ |
| 17 |
auto f1 = function() bode; |
| 18 |
auto test1() bode; |
| 19 |
auto test2()() bode; |
| 20 |
|
| 21 |
enum : int (int function() bode T); |
| 22 |
} |