Comment #0 by ilyayaroshenko — 2018-11-12T13:02:20Z
import std.meta;
alias A = AliasSeq!(int[1]);
struct S { A a; }
S foo()
{
A s;
s[0][0] = 1;
return S(s);
}
static assert(foo.a[0][0] == 1);
------------------
onlineapp.d(9): Error: variable __s_field_0 cannot be read at compile time
onlineapp.d(13): called from here: foo()
onlineapp.d(13): while evaluating: static assert(foo().__a_field_0[0] == 1)
Comment #1 by razvan.nitu1305 — 2023-04-25T14:34:30Z
The code now segfaults.
Comment #2 by robert.schadek — 2024-12-13T19:01:19Z