| 1 |
// https://issues.dlang.org/show_bug.cgi?id=20695 |
| 2 |
struct Bar |
| 3 |
{ |
| 4 |
this(const ref Bar o) {} |
| 5 |
|
| 6 |
string a; |
| 7 |
uint b; |
| 8 |
} |
| 9 |
|
| 10 |
struct Bar1 |
| 11 |
{ |
| 12 |
@disable this(int a); |
| 13 |
this(const ref Bar1 o) {} |
| 14 |
|
| 15 |
string a; |
| 16 |
uint b; |
| 17 |
} |
| 18 |
|
| 19 |
struct Bar2 |
| 20 |
{ |
| 21 |
this(const ref Bar2 o) {} |
| 22 |
@disable this(T)(T a) {} |
| 23 |
|
| 24 |
string a; |
| 25 |
uint b; |
| 26 |
} |
| 27 |
void main () |
| 28 |
{ |
| 29 |
Bar b = { a: "Hello", b: 42 }; |
| 30 |
Bar c = Bar("Hello", 42); |
| 31 |
|
| 32 |
Bar1 b1 = { a: "Hello", b: 42 }; |
| 33 |
|
| 34 |
Bar2 b2 = { a: "Hello", b: 42 }; |
| 35 |
} |