https://issues.dlang.org/show_bug.cgi?id=23959
Issue ID: 23959
Summary: [REG2.101.0] Copying arrays of types with postblits
from varargs broken
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: wrong-code
Severity: regression
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
//////// test.d ///////
struct ST()
{
int i;
this(this) {}
}
alias S = ST!();
void poison()
{
static S g;
auto s = g;
}
S[1] sa;
void fun(S[] values...)
{
sa[] = values;
}
unittest
{
fun(S(1));
assert(sa[0].i);
}
///////////////////////
Introduced in https://github.com/dlang/dmd/pull/14310
--