| 1 |
// https://issues.dlang.org/show_bug.cgi?id=19415 |
| 2 |
|
| 3 |
struct S |
| 4 |
{ |
| 5 |
int x; |
| 6 |
S foo() return { return S(x); } |
| 7 |
this(this) @disable; |
| 8 |
} |
| 9 |
|
| 10 |
S bar() |
| 11 |
{ |
| 12 |
S s; |
| 13 |
return s; // Error: struct `S` is not copyable because it is annotated with @disable |
| 14 |
} |