2015-05-12 12:06 GMT+02:00 Yuriy Tymchuk <[email protected]>:
> Hi,
>
> I’ve noticed that if you install a trait on a class and a trait defines
> explicit requirement method, and this method is defined in a super class,
> it is being looked up during execution through #explicitRequirement method.
> It was slowing down my execution by almost 20%. Is there a special way to
> use a Trait to avoid that, or it’s work-in-progress solution?
>
I find this behavior questionable, when did this change? ( I thought self
explicitRequirement always signals an error and does not try to find the
method in the superclass chain).
Anyway, if you want to use the super class method, you can just remove the
method from the trait usage.
ASuperClass subclass: #MySubclass
uses: ATrait - {#theMethodDefinedInSuperclassAndTrait }
instanceVariableNames: ''
classVariableNames: ''
category: ''
regards
Nicolai
>
> Uko
>