Hey,

This is a feature but it had side effect problems. For instance, in the inspector you can see twice the instance variable of that name, 1 being nil and the other one having the correct value.

Therefore in Pharo 3.0 with the new class builder / object layout this feature was removed. Now your code will raise an Error (DuplicatedSlot) and you cannot save your class any more (a popup with the error is shown). The error tells you which instance variable is duplicated so you can fix it by removing the duplicated instance variable and saving again the class.


2013/11/4 Luc Fabresse <luc.fabresse@gmail.com>




2013/11/4 Luc Fabresse <luc.fabresse@gmail.com>

perhaps related to the new object layout.

arg no, not in 2.0 I guess

Luc

Luc

2013/11/4 Noury Bouraqadi <bouraqadi@gmail.com>
Hi,

In Pharo2.0 �#20625 it's possible to create two classes, one inheriting from the other, and declaring the exact same IV (attached code).
It turns out that instances of the subclass hold two IVs with the exact name.
When accessing the IV in the superclass, the first IV is used, while in the subclass the second IV is accessed.

Bug or feature?

Noury
Ecole des Mines de Douai
http://car.mines-douai.fr/noury
--






Afin de contribuer au respect de l'environnement,


merci de n'imprimer ce courriel qu'en cas de necessite





Please consider the environment before you print