http://d.puremagic.com/issues/show_bug.cgi?id=2428
Summary: Accessing item in enum'd array produced compiler error
Product: D
Version: 2.019
Platform: PC
OS/Version: Linux
Status: NEW
Keywords: ice-on-valid-code
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
I found this while porting Tango to D2, and converting manifest constants to
enums. When using the full tango file, the result was a successful compilation
and a segfault.
However, when creating the minimal case:
struct S(T)
{
invariant(T)[] s;
}
T foo(T)(T t)
{
enum S!(T)[] i = [{"hello"},{"world"}];
auto x = i[0].s;
return t;
}
void main()
{
auto x = foo('c');
}
the following error occurs:
dmd: inline.c:569: virtual Expression*
DeclarationExp::doInline(InlineDoState*): Assertion `ie' failed.
Aborted
The segfault might be related to the inline.c error, so probably fix that.
Then if the original error still occurs, I'll post another bug.
--