| 1 |
// https://issues.dlang.org/show_bug.cgi?id=23236 |
| 2 |
// can't initialize a @mustuse member in constructor |
| 3 |
|
| 4 |
import core.attribute; |
| 5 |
|
| 6 |
@mustuse struct MyError { } |
| 7 |
|
| 8 |
struct S |
| 9 |
{ |
| 10 |
MyError lastError; |
| 11 |
|
| 12 |
this(int x) |
| 13 |
{ |
| 14 |
this.lastError = MyError(); |
| 15 |
} |
| 16 |
} |