On 2012-06-01 15:51, Steven Schveighoffer wrote:
On Fri, 01 Jun 2012 09:25:57 -0400, d coder <[email protected]> wrote:
Class Bar(alias F) {
// Call F in some function here
}

Class Foo {
void foo();
Bar!(() {foo();}) bar;
}

Again this does not work. Maybe I am expecting too much from D. :-) I am
somewhat aware of the issues involved here. I have seen some earlier D
threads.

lambdas cannot exist outside a function scope. This is a limitation of D
that has been pointed out before, and I think it should be made
available, but don't hold your breath :) D is just starting to get more
filled out in the area of lambdas.

That can't work since there is no this-reference for "foo"?

--
/Jacob Carlborg

Reply via email to