mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
15 lines
177 B
D
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);
|