| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/fail11714.d(14): Error: variable `fail11714.c` is a thread-local class and cannot have a static initializer. Use `static this()` to initialize instead. |
| 5 |
fail_compilation/fail11714.d(21): Error: variable `fail11714.s` is a thread-local pointer to struct and cannot have a static initializer. Use `static this()` to initialize instead. |
| 6 |
--- |
| 7 |
*/ |
| 8 |
|
| 9 |
class C11714 |
| 10 |
{ |
| 11 |
int data; |
| 12 |
}; |
| 13 |
|
| 14 |
C11714 c = new C11714; // mutable class reference. |
| 15 |
|
| 16 |
struct S11714 |
| 17 |
{ |
| 18 |
int data; |
| 19 |
}; |
| 20 |
|
| 21 |
S11714* s = new S11714; // mutable pointer to struct. |