| 1 |
/* TEST_OUTPUT: |
| 2 |
--- |
| 3 |
fail_compilation/testsemi.d(102): Error: found `int` when expecting `;` following static assert |
| 4 |
fail_compilation/testsemi.d(102): Error: variable name expected after type `x`, not `;` |
| 5 |
fail_compilation/testsemi.d(109): Error: found `alias` when expecting `;` following alias reassignment |
| 6 |
fail_compilation/testsemi.d(112): Error: found `}` when expecting `;` following invariant |
| 7 |
fail_compilation/testsemi.d(117): Error: found `int` when expecting `;` following `alias Identifier this` |
| 8 |
fail_compilation/testsemi.d(117): Error: variable name expected after type `x`, not `;` |
| 9 |
fail_compilation/testsemi.d(123): Error: found `int` when expecting `;` following mixin |
| 10 |
fail_compilation/testsemi.d(129): Error: found `int` when expecting `;` following `import` Expression |
| 11 |
fail_compilation/testsemi.d(131): Error: `}` expected following members in `class` declaration |
| 12 |
fail_compilation/testsemi.d(112): class `C` starts here |
| 13 |
--- |
| 14 |
*/ |
| 15 |
|
| 16 |
#line 100 |
| 17 |
|
| 18 |
static assert(1) |
| 19 |
int x; |
| 20 |
|
| 21 |
template map(alias F, Args...) |
| 22 |
{ |
| 23 |
alias A = AliasSeq!(); |
| 24 |
static foreach (Arg; Args) |
| 25 |
A = AliasSeq!(A, F!Arg) |
| 26 |
alias staticMap = A; |
| 27 |
} |
| 28 |
|
| 29 |
class C { invariant(3) } |
| 30 |
|
| 31 |
class D |
| 32 |
{ |
| 33 |
alias x this |
| 34 |
int x; |
| 35 |
} |
| 36 |
|
| 37 |
void test1() |
| 38 |
{ |
| 39 |
mixin("int x;") |
| 40 |
int y; |
| 41 |
} |
| 42 |
|
| 43 |
void test2() |
| 44 |
{ |
| 45 |
import(1) |
| 46 |
int z; |
| 47 |
} |