Bug 2428 – Accessing item in enum'd array produced compiler error

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2008-10-23T10:49:00Z
Last change time
2015-06-09T01:20:17Z
Keywords
ice-on-valid-code
Assigned to
bugzilla
Creator
schveiguy

Comments

Comment #0 by schveiguy — 2008-10-23T10:49:44Z
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.
Comment #1 by bugzilla — 2008-12-08T00:57:02Z
Fixed in DMD 2.021