diff options
Diffstat (limited to 'gcc/testsuite/gdc.test/compilable/test22226.d')
-rw-r--r-- | gcc/testsuite/gdc.test/compilable/test22226.d | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/compilable/test22226.d b/gcc/testsuite/gdc.test/compilable/test22226.d new file mode 100644 index 00000000000..77b37971dfe --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/test22226.d @@ -0,0 +1,15 @@ +// https://issues.dlang.org/show_bug.cgi?id=22226 + +struct A {} + +A move(A a) { return A.init; } + +struct SumType +{ + A a; + + this(A value) + { + a = __ctfe ? value : move(value); + } +} |