Debian Codegraph @

libphobos/testsuite/libphobos.betterc/test22336.d

raw
1 /*******************************************/
2 // https://issues.dlang.org/show_bug.cgi?id=22336
3
4 import core.lifetime;
5
6 struct Foo {
7 int f = -1;
8 @disable this(this);
9 this(int x) { f = x; }
10 @disable this();
11 }
12
13 extern(C) int main() {
14 Foo a = Foo(42);
15 Foo b = move(a);
16 assert(a.f == -1);
17 assert(b.f == 42);
18 return 0;
19 }