Is this supposed to be a bug?

Daniel Ribeiro Maciel daniel.maciel at gmail.com
Sun Nov 2 16:56:10 PST 2008


void handler( alias dg )()
{
  alias ParameterTypeTuple!( typeof(dg) ) TParamTuple;
  alias ReturnType!(dg) TResult;

  TParamTuple params;
  foreach( ref param; params )
  {}
}

double hello( double i )
{
  writefln( "zomfg ", i );
}

int main( in string[] )
{
  handler!(hello)();
}

This code yields error on "foreach( ref param; params )": Error : No storage class for value param

Best regards,
Daniel




More information about the Digitalmars-d mailing list