d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail11355.d
blob50897ad802a32c9bcdfc72e94769e7e12e10115b
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail11355.d(28): Error: struct `fail11355.A` is not copyable because it has a disabled postblit
5 ---
6 */
8 T move(T)(ref T source)
10 return T.init; // Dummy rvalue
13 struct A
15 ~this() {}
16 @disable this(this); // Prevent copying
19 struct B
21 A a;
22 alias a this;
25 void main()
27 B b;
28 A a = move(b);