BlockClosure>>isClean bug?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

BlockClosure>>isClean bug?

jfabry
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


Reply | Threaded
Open this post in threaded view
|

Re: BlockClosure>>isClean bug?

jfabry

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 <[hidden email]> 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