I've attached a test that demonstrates the current behavior of lambdas. What
is expected is when
the lambda qux is called, it should print the value of the field foo when the
lambda was initially
created, which is "foo". Instead, it prints "bar", the value of the field foo
when the lambda is called.
This is inconsistent with the typical behavior of lambdas in functional
languages, which is to capture
the current value of whatever variables are referenced in their bodies,
regardless of whether those
variables change later on.
Original issue reported on code.google.com by mhahn...@gmail.com on 1 Jun 2010 at 9:00
Original issue reported on code.google.com by
mhahn...@gmail.com
on 1 Jun 2010 at 9:00Attachments: