May 24, 2004 MixinIdentifier can't be used within a class? | ||||
---|---|---|---|---|
| ||||
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 Re: MixinIdentifier can't be used within a class? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Roel Mathys | 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 |
Copyright © 1999-2021 by the D Language Foundation