New Traits

John Maschmeyer jmaschme at gmail.com
Wed May 16 14:19:00 PDT 2012


On Wednesday, 16 May 2012 at 17:04:32 UTC, Justin Whear wrote:
> Does codeof work with lambda literals? If so, I'm envisioning a 
> LINQ-to-
> SQL-esque library.

It works for a function literal that has been assigned to a 
variable.

Function Literal:
   int function(int) func = x => x+1;
   writeln(__traits(codeof, func));
Outputs:
   int function(int) func = delegate pure nothrow @safe int(int x)
   {
   return x + 1;
   }
   ;


More information about the Digitalmars-d mailing list