www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [std.boxer] unbox failure

[std.boxer] unbox failure

<code>
import std.boxer;

int f(){
  return 1;
}

void main(){
  Box b= box( &f);
  int function() g= unbox!( int function())( b);
}
</code>

yields:

<output>
E:\home\d\tests>dmd box -release
e:\dmd\bin\..\src\phobos\std\boxer.d(576): can't have array of int()
e:\dmd\bin\..\src\phobos\std\boxer.d(577): can't have array of int()
e:\dmd\bin\..\src\phobos\std\boxer.d(10): template instance 
std.boxer.unbox!(int(*)()) error instantiating
</output>

-manfred
Jul 25 2005