Today, after some work, I also noticed, that 2 methods from base trait was "copied" magicaly to the inherited trait (with same implementation as base trait) - I don't know why and when + Monticello is confused about trait method changes again... Bad thing is, these magic issues are nearly irreproducible, maybe later... With manual tweaking sometimes, I can still work further...
I added bug/enhancement about Nautilus & explicitRequirement to the Pharo fogbuz. Thanks! > Hi Petr! > > You have found what I think is a bug. Indeed, Nautilus may be improved to > have the behavior you describe. Having an explicit requirement ("self > explicitRequirement”) should be indicated by Nautilus. I suggest you to open > a bug on https://pharo.fogbugz.com > > Regarding the second problem, I cannot reproduce it. Do you have the exact > steps to reproduce it? > > Alexandre > > > > On Aug 27, 2016, at 10:23 PM, Petr Fischer <petr.fisc...@me.com> wrote: > > > > Hello, is Trait methods inheritance supported in Pharo? > > > > Like this: > > > > TBaseTrait>>myMethod > > self subclassresponsibility > > > > TSubTrait > > uses: TBaseTrait > > ... > > TSubTrait>>myMethod > > some real implementation > > > > MyClass > > uses: TSubTrait > > (MyClasss>>myMethod already implemented in TSubTrait, but I can reimplement > > again) > > > > Problems: > > > > 1) when I put "self subclassresponsibility" in TBaseTrait, everything is > > nicely visible in Nautilus browser (something like "abstract" method with > > proper (a) yellow icon). But I read somewhere, that for traits, I must use > > "^ self explicitRequirement" instead of "subclassresponsibility" - then, I > > can't see anything usefull in Nautilus > > > > 2) sometimes (it was maybe with "self subclassresponsibility" in > > TBaseTrait), Monticello not detected overrided TSubTrait>>myMethod > > (TSubTrait residing in another package than TBaseTrait) and this overrided > > trait method in TSubTrait was not saved in monticelo package (no changes > > was detected by Monticello, thus not saved to mcz package!) > > > > So - is trait a "bag of methods" only, or is trait inheritance supported? > > Thanks very much! > > > > pf > > > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > >