Scope of lambdas and closures

Rolv Seehuus rolv.seehuus at gmail.com
Sat Jul 30 13:43:22 PDT 2011


== Quote from Daniel Murphy (yebblies at nospamgmail.com)'s article
> "Rolv Seehuus" <rolv.seehuus at gmail.com> wrote in message
> news:j04qff$i4s$1 at digitalmars.com...
> > Is there a related/same reason why this don't compile?
> >
> > unittest {
> >  static void stuff(){}
> >  static void function()[string] functions = [ "stuff":&stuff ];
> > }
> That compiles for me.

Ok - Compiler version/os? I'm on MacOS, compiler outputs the following:
DMD32 D Compiler v2.054

-r-




More information about the Digitalmars-d-learn mailing list