Hi,

Now with Pharo5 started, I will try to at least do a tiny increment regularly 
again on Reflectivity
(and hopefully larger ones, too).

Today: tiny fix: Link condition is working.

The idea is that a meta link can have a condition which is compiled into the 
code. This tiny change
makes it work again:

testLinkWithCondition
        | sendNode link condition |
        condition := false.
        sendNode := (ReflectivityExamples>>#exampleMethod) ast body statements 
first value.
        link := MetaLink new 
                condition: [condition];
                metaObject: self; 
                selector: #tagExec.
        sendNode link: link.
        self assert: sendNode hasMetalink.
        self assert: (ReflectivityExamples>>#exampleMethod) class = 
ReflectiveMethod.
        self assert: (tag isNil).
        self assert: (ReflectivityExamples new exampleMethod = 5).
        self assert: (tag isNil).
        condition := true.
        self assert: (ReflectivityExamples new exampleMethod = 5).
        self assert: (tag = #yes).

This is fixed in #50017 (test is green).

Next step: when *changing* the condition object (e.g. to true or false or a 
different block), we 
need to re-generate code.

==> we need #invalidate on the MetaLink and call it on #condition:. 
This is the next step for (hopefully) tomorrow.

        Marcus

Reply via email to