| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/fail4923.d(5): Error: immutable variable `bar` initialization is not allowed in `static this` |
| 5 |
fail_compilation/fail4923.d(5): Use `shared static this` instead. |
| 6 |
fail_compilation/fail4923.d(6): Deprecation: const variable `baz` initialization is not allowed in `static this` |
| 7 |
fail_compilation/fail4923.d(6): Use `shared static this` instead. |
| 8 |
--- |
| 9 |
*/ |
| 10 |
#line 1 |
| 11 |
immutable int bar; |
| 12 |
const int baz; // https://issues.dlang.org/show_bug.cgi?id=24056 |
| 13 |
static this() |
| 14 |
{ |
| 15 |
bar = 42; |
| 16 |
baz = 43; |
| 17 |
} |