digitalmars.D.bugs - MixinIdentifier can't be used within a class?
- Roel Mathys (24/26) May 24 2004 template Foo()
- Ivan Senji (5/31) May 24 2004 Had the same problem posted in
This code:template Foo() { const int x = 5; } class C { mixin Foo F; } void main() { C c = new C; printf("%d\n",c.F.x); } <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< gives the following output:parse property semantic property semantic2 property semantic3 property D:\apps\D\templates\property.d(37): c.Foo!() F is not a declaration <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< regards, roel
May 24 2004
Had the same problem posted in
"mixin bug? multiple mixin declaration problem"
Walter said it is a bug.
"Roel Mathys" <roel.mathys yucom.be> wrote in message
news:c8tgbc$7bb$1 digitaldaemon.com...
This code:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
template Foo()
{
const int x = 5;
}
class C
{
mixin Foo F;
}
void main()
{
C c = new C;
printf("%d\n",c.F.x);
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
gives the following output:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
parse property
semantic property
semantic2 property
semantic3 property
D:\apps\D\templates\property.d(37): c.Foo!() F is not a declaration
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
regards,
roel
May 24 2004








"Ivan Senji" <ivan.senji public.srce.hr>