d: Merge upstream dmd, druntime 26f049fb26, phobos 330d6a4fd.
[official-gcc.git] / gcc / testsuite / gdc.test / compilable / test20695.d
blobfe4074b1c115bc6ada4ddae872689a05659c2722
1 // https://issues.dlang.org/show_bug.cgi?id=20695
2 struct Bar
4 this(const ref Bar o) {}
6 string a;
7 uint b;
10 struct Bar1
12 @disable this(int a);
13 this(const ref Bar1 o) {}
15 string a;
16 uint b;
19 struct Bar2
21 this(const ref Bar2 o) {}
22 @disable this(T)(T a) {}
24 string a;
25 uint b;
27 void main ()
29 Bar b = { a: "Hello", b: 42 };
30 Bar c = Bar("Hello", 42);
32 Bar1 b1 = { a: "Hello", b: 42 };
34 Bar2 b2 = { a: "Hello", b: 42 };