[Issue 4085] Steps toward a static foreach
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 22 16:53:08 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4085
--- Comment #11 from bearophile_hugs at eml.cc 2013-08-22 16:53:06 PDT ---
Another comment by Timon Gehr:
> We really need to define a consistent semantics for compile
> time symbol manipulation though.
>
> Eg:
>
> class C{
> int a;
> static foreach(x;__traits(allMembers,C)){
> mixin("int "~__traits(identifier,x)~"b;");
> }
> }
>
> What is this supposed to do? "class C{ int a,ab; }"?
> Non-terminating compilation? Error?
>
> My best guess is that the above code should be illegal,
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list