aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/test22639.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.test/compilable/test22639.d')
-rw-r--r--gcc/testsuite/gdc.test/compilable/test22639.d26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/compilable/test22639.d b/gcc/testsuite/gdc.test/compilable/test22639.d
new file mode 100644
index 0000000..a889aa9
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test22639.d
@@ -0,0 +1,26 @@
+// https://issues.dlang.org/show_bug.cgi?id=22639
+
+struct A
+{
+ this(ref return scope A rhs) inout {}
+ this(ref return scope const A rhs, int b = 7) inout
+ {
+ if (b != 7) {
+ this.b = b;
+ }
+ }
+
+ this(this) @disable;
+
+ int a=4;
+ int b=3;
+}
+
+void main()
+{
+ A a = A();
+ A c = A(a, 10);
+ A d = void;
+ d.__ctor(a, 200);
+ A* b = new A(a, 10);
+}