BlockClosure>>isClean bug?
Hi all, I was wondering if there is a bug in BlockClosure>>isClean. As I understand it (see method comment below), the code below should evaluate to false as it closes over foo, but it does not. Here is the comment for isClean: "Answer if the receiver does not close-over any variables other than globals, and does not ^-return (does not close over the home context). Clean blocks are amenable to being created at compile-time." | foo| foo := Time now. [foo] isClean ---> Save our in-boxes! http://emailcharter.org <--- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
Sorry, I forgot to say that this is in 2.0 (build of end of october). On Jan 7, 2013, at 11:27 AM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
Hi all,
I was wondering if there is a bug in BlockClosure>>isClean. As I understand it (see method comment below), the code below should evaluate to false as it closes over foo, but it does not.
Here is the comment for isClean: "Answer if the receiver does not close-over any variables other than globals, and does not ^-return (does not close over the home context). Clean blocks are amenable to being created at compile-time."
| foo| foo := Time now. [foo] isClean
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
---> Save our in-boxes! http://emailcharter.org <--- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD lab - Computer Science Department (DCC) - University of Chile
participants (1)
-
Johan Fabry