2014-05-03 2:46 GMT+02:00 <[hidden email]>: Eliot Miranda uploaded a new version of Kernel to project The Trunk: Hi Eliot, this is breaking Traits as shown by PureBehaviorTests>>testReshapeClass We must look into ClassBuilder>>newSubclassOf: newSuper type: type instanceVariables: instVars from: oldClass, After this instruction: [newClass compileAllFrom: oldClass] newClass methodDictionary has bindings that points to oldClass instead of newClass (the bindings are #C2 -> oldClass)
Then what happens in newClass setTraitComposition: -> uses: -> installTraitsFrom: -> assembleTraitMethodsFrom: ??? The methods are not recognized as local methods (isLocalMethod:) because the binding points to the oldClass, not the newClass... As a consequence, the local methods #(foo bar) are not re-installed in newClass, but lost. What do you think? Should we revert this? Or hack isLocalMethod: to rely on name rather than identity? self methodsDo:[:m| |
Hi Nicolas,
On Mon, May 26, 2014 at 5:01 PM, Nicolas Cellier <[hidden email]> wrote:
Well, I think the ClassBuilder should just change the bindings in the methods once the replacement class is installed. I've committed a fix. I should have worked out that ClassBuilder>>update:to: was the lace to put the code in the first place. Sorry for the mess.
-- best,Eliot
|
Free forum by Nabble | Edit this page |