[Pharo-dev] Critical ClassBuilder bug

Guillermo Polito guillermopolito at gmail.com
Tue Dec 17 10:59:31 EST 2013


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/20131217/744115e5/attachment-0002.html>


More information about the Pharo-dev mailing list