digitalmars.D.bugs - mixin ctor not recognised
- Regan Heath (27/27) Mar 16 2005 import std.stdio;
import std.stdio; template ctor(Type) { this(Type[] arr) { foreach(Type b; arr) writefln(typeid(typeof(Type))); } } class A { this(){} mixin ctor!(bit); } void main() { static bit[] arr = [1,0,1,0]; A a = new A(arr); } So, is this because the mixin creates a scope.. I tried naming the mixin and using an alias eg. mixin ctor!(bit) ctorb; alias ctorb.this this; no such luck. :( I vaguely remember someone else posting something like this a little while back. Regan
Mar 16 2005