www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - mixin bug? multiple mixin declaration problem

reply "Ivan Senji" <ivan.senji public.srce.hr> writes:
I have this code

template Point()
 real x,y;

class FourPoints
 mixin Point T1;
 mixin Point T2;
 mixin Point T3;
 mixin Point T4;

And inside this class i can use T1.x, T2.y!

but in main i have:

FourPoints FP = new FourPoints();
FP.T1.x = 3;

but this last line causes:
E:\D language\opengl\ifs\ifs.d(185): FP.Point!() T1 is not a declaration
Obviously i can't use FP.x = 3; beacause then i get:
E:\D language\opengl\ifs\ifs.d(28): variable x conflicts with Point!() T2.x
at E:\D language\opengl\ifs\ifs.d(28)

Hope this is a bug :) and not a feature.
May 20 2004
parent "Walter" <newshound digitalmars.com> writes:
Yes, it's a bug.
May 21 2004