[Issue 2428] New: Accessing item in enum'd array produced compiler error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 23 08:49:45 PDT 2008
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: bugzilla at digitalmars.com
ReportedBy: schveiguy at yahoo.com
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.
--
More information about the Digitalmars-d-bugs
mailing list