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

15 lines
177 B
D

struct S { char[1] e = void; }
void init(ref char[1] e)
{
e[0 .. 1] = "A";
}
int foo()
{
auto s = S();
init(s.e);
return __ctfe;
}
static assert(foo() == 1);