← Back to index
|
Original Bugzilla link
Bug 6918 – Internal error: e2ir.c 1242
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2011-11-09T02:37:00Z
Last change time
2012-06-24T14:29:29Z
Assigned to
nobody
Creator
tobias
Comments
Comment #0
by tobias — 2011-11-09T02:37:54Z
I'd say, I found another compiler bug. ----------------- import std.stdio; template Struct(alias bar) { struct S { void foo() { FancyFunc!(this, bar).fn(); } } } template FancyFunc(alias context, alias f) { void fn() { writeln("before"); f(context); writeln("after"); } } void bar(CT)(CT context) { writeln(CT.stringof); } void main() { alias Struct!(bar).S MyStruct; MyStruct s = MyStruct(); s.foo(); } ---------------------- Compile it with dmd and dmd will print: > Internal error: e2ir.c 1242
Comment #1
by hoganmeier — 2011-11-09T05:44:48Z
Little bit simplified: struct S(alias bar) { void foo() { fn!(this, bar)(); } } void fn(alias context, alias f)() { f(context); } void bar(CT)(CT context) { } void main() { alias S!bar MyStruct; }
Comment #2
by tobias — 2012-06-24T14:29:29Z
Seems to be fixed.