Bug 2520 – ICE on template mixin typedef

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-12-17T07:36:00Z
Last change time
2015-06-09T05:14:57Z
Keywords
ice-on-valid-code, patch
Assigned to
bugzilla
Creator
kovrov+puremagic

Comments

Comment #0 by kovrov+puremagic — 2008-12-17T07:36:37Z
class Base { } class Derived(alias TEST) : Base { mixin TEST; } void test()() {} void main() { //alias Derived!(test) MyDerived; // ok typedef Derived!(test) MyDerived; // ICE Base obj = new MyDerived(); }
Comment #1 by clugdbug — 2009-05-04T09:28:33Z
Patch against DMD2.029. Index: e2ir.c =================================================================== --- e2ir.c (revision 24) +++ e2ir.c (working copy) @@ -3603,7 +3603,7 @@ cdfrom = e1->type->isClassHandle(); cdto = t->isClassHandle(); - if (cdfrom->isInterfaceDeclaration()) + if (cdfrom && cdfrom->isInterfaceDeclaration()) { rtl = RTLSYM_INTERFACE_CAST; if (cdfrom->isCPPinterface())
Comment #2 by clugdbug — 2009-05-13T13:03:48Z
Fixed DMD2.030 and 1.045