| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/fail13601.d(13): Error: variable `__ctfe` cannot be read at compile time |
| 5 |
fail_compilation/fail13601.d(14): Error: variable `__ctfe` cannot be read at compile time |
| 6 |
fail_compilation/fail13601.d(15): Error: variable `__ctfe` cannot be read at compile time |
| 7 |
fail_compilation/fail13601.d(16): Error: variable `__ctfe` cannot be read at compile time |
| 8 |
--- |
| 9 |
*/ |
| 10 |
|
| 11 |
void test() |
| 12 |
{ |
| 13 |
static if (__ctfe) {} |
| 14 |
enum a = __ctfe ? "a" : "b"; |
| 15 |
static int b = __ctfe * 2; |
| 16 |
int[__ctfe] sarr; |
| 17 |
} |