Debian Codegraph @

gcc/testsuite/gdc.test/compilable/test22639.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=22639
2
3 struct A
4 {
5 this(ref return scope A rhs) inout {}
6 this(ref return scope const A rhs, int b = 7) inout
7 {
8 if (b != 7) {
9 this.b = b;
10 }
11 }
12
13 this(this) @disable;
14
15 int a=4;
16 int b=3;
17 }
18
19 void main()
20 {
21 A a = A();
22 A c = A(a, 10);
23 A d = void;
24 d.__ctor(a, 200);
25 A* b = new A(a, 10);
26 }