dmd/compiler/test/compilable/test22226.d
2022-07-09 18:53:07 +02:00

15 lines
197 B
D

// 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);
}
}