[Issue 19392] New: [CTFE] static array in a tuple has not is not CTFE-able
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 12 13:02:20 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19392
Issue ID: 19392
Summary: [CTFE] static array in a tuple has not is not
CTFE-able
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: ilyayaroshenko at gmail.com
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)
--
More information about the Digitalmars-d-bugs
mailing list