1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail11355.d(28): Error: struct fail11355.A is not copyable because it is annotated with @disable
5 ---
6 */
7 
move(T)8 T move(T)(ref T source)
9 {
10     return T.init;          // Dummy rvalue
11 }
12 
13 struct A
14 {
~thisA15     ~this() {}
16     @disable this(this);    // Prevent copying
17 }
18 
19 struct B
20 {
21     A a;
22     alias a this;
23 }
24 
main()25 void main()
26 {
27     B b;
28     A a = move(b);
29 }
30