Bruno Medeiros <> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |
         Resolution|                            |DUPLICATE

--- Comment #1 from Bruno Medeiros <> 2010-11-19 
08:59:45 PST ---
There is not just one variable 'v', there are several "instances" of variable
'v', each of them created on each iteration of the loop. Each of them is
immutable during its lifecycle (and cease to exist after their lifecycle, by

The orthogonal solution is:
 * make each 'v' variable be heap-allocated (have unscoped lifecycle). This is
consistent to how variables work in the top scope in functions.

I'm starting to reconsider though, if closures should automatically make
variables be heap-allocated. Maybe its best to require a keyword/annotation in
such referenced variables, and make the code not compile if such keywords is
not present.

*** This issue has been marked as a duplicate of issue 2043 ***

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to