[Pharo-dev] Critical ClassBuilder bug

Stéphane Ducasse stephane.ducasse at inria.fr
Wed Dec 25 14:42:00 EST 2013


do you have a test because we should really cover the classBuilder with such 

On 17 Dec 2013, at 16:59, Guillermo Polito <guillermopolito at gmail.com> wrote:

> Hi!!
> I started this afternoon to see a bug on class bindings on trait methods. This one: https://pharo.fogbugz.com/f/cases/11756/Reshaping-a-class-breaks-classBinding-identity
> Now, after playing and moving around that, I noticed that the problem is worse:
> 1)Create Class A.
> 2)Create method A>>m1.
> 3)Create method A>>m2.
> 4)reshape the class (e.g. add an inst var)
> Then: (A>>#m2) classBinding == (A>>#m3) classBinding ==> false!!!
> The problem is caused because the recompilation of the methods is taking place in a class that is not yet installed in its environment (the Smalltalk system dictionary in this case). The installation of the class takes part after the reshaping+the recompilation. Then, when the methods are compiled, the binding is not available for them and new bindings are created.
> Would someone with more idea on the new class builder give some advice? Cause I'm a bit lost in the new class builder code :)
> Tx,
> Guille

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131225/18c9256b/attachment-0002.html>

More information about the Pharo-dev mailing list