Compiler bug ?

Juan Manuel Cabo juanmanuel.cabo at gmail.com
Sun Jun 9 09:02:01 PDT 2013


On Sunday, 9 June 2013 at 13:37:45 UTC, Temtaime wrote:
> Hello guys!
>
> It seems that it is bug. And critical for me.
> http://dpaste.1azy.net/b93f5776
>
> Regards.


I don't know whether it's a bug, but I managed to reduce the error
to the following code (removing __traits code):

     import std.stdio;
     import std.typetuple;

     void bar(alias expr)() {
         writeln(expr);
     }

     void main() {
         foreach(it; TypeTuple!("a","b","c")) {
             auto tp = TypeTuple!(it);

             bar!(tp[0])();
             writeln(`should be: `, tp[0]);
         }
     }


This prints:

     a
     should be: a
     a
     should be: b
     a
     should be: c

--jm



More information about the Digitalmars-d-learn mailing list