digitalmars.D.bugs - bug: mixin and classes
- Tyro [a.c.edwards] (26/26) Jul 02 2009 OS: Windows 7RC
OS: Windows 7RC Compiler: DMD v2.030 Library: Phobos2 Attached file is Cris Miller's template implementation of a circular list download today from dprogramming.com. Note that changing the order of declaration for the two classes produces a slightly different error message, but the problem remains the same. Additionally, removing the LM2Asset class allows the code to compile correctly. private import list; void main() { UIC.ListHead uicList; foreach (n; 0 .. 10) { uicList ~= new UIC(); } } // comment out LM2Asset and this compiles correctly class LM2Asset { mixin List; } class UIC { mixin List; }
Jul 02 2009