Re: Scope of lambdas and closures

2011-07-30 Thread Rolv Seehuus
== Quote from Rolv Seehuus (rolv.seeh...@gmail.com)'s article > == Quote from Daniel Murphy (yebbl...@nospamgmail.com)'s article > > "Rolv Seehuus" wrote in message > > news:j04qff$i4s$1...@digitalmars.com... > > > Is there a related/same reason

Re: Scope of lambdas and closures

2011-07-30 Thread Rolv Seehuus
== Quote from Daniel Murphy (yebbl...@nospamgmail.com)'s article > "Rolv Seehuus" wrote in message > news:j04qff$i4s$1...@digitalmars.com... > > Is there a related/same reason why this don't compile? > > > > unittest { > > static void stuff

Re: Scope of lambdas and closures

2011-07-19 Thread Rolv Seehuus
== Quote from Daniel Murphy (yebbl...@nospamgmail.com)'s article > That would be http://d.puremagic.com/issues/show_bug.cgi?id=2634 Thanks, Is there a related/same reason why this don't compile? unittest { static void stuff(){} static void function()[string] functions = [ "stuff":&stuff ]; }

Scope of lambdas and closures

2011-07-17 Thread Rolv Seehuus
Hi all, First post - I'm learning D, 10yrs exp. with C++. While trying to generate a static table of functions using lambdas compile time using mixins, I ran in to this little (for me) conundrum. Given that we have this function available: static void foo(){ writefln("Hohum"); } This compi