[Pharo-project] About SourcedMethodReference

Eliot Miranda eliot.miranda at gmail.com
Wed Nov 10 12:14:28 CET 2010


On Tue, Nov 9, 2010 at 7:22 PM, Benjamin <
benjamin.vanryseghem.pharo at gmail.com> wrote:

>
> On Nov 9, 2010, at 10:48 PM, Luc Fabresse wrote:
>
>  Hi all,
>>
>> When SourcedMethodReference have been introduced, some tests in
>> SystemNavigationTest turned yellow.
>> The tests are currently expecting a MethodReference.
>> If I modify the tests to exepect a SourcedMethodReference, the problem is
>> now on:
>>
>> SourcedMethodReference>>=
>>       ^self == aMethodReference.
>>
>> Why this has been redefined in SourcedMethodReference?
>>
>
> It has been redefined becausea the end, we want to remove MethodReference,
> and this is the default behavior for the method =


Why do you want to remove MethodReference?


>
>
>  I think that the super class (MethodReference) implementation is
>> semantically better. No?
>>
>> MethodReference>>= anotherMethodReference
>>        "Answer whether the receiver and the argument represent the
>>        same object."
>>        ^ self species == anotherMethodReference species
>>                and: [(self classSymbol = anotherMethodReference
>> classSymbol)
>>                                and: [(self classIsMeta =
>> anotherMethodReference classIsMeta)
>>                                                and: [self methodSymbol =
>> anotherMethodReference methodSymbol]]]
>> #Luc
>>
>
> This method doesn't answer what we expect anymore, because here, two
> references (with different source) pointing on two versions of the same
> method are evaluate as equal, and we do not want that.
>
> About tests, JB and I had wrote a fix, but we have lost it ...
> But I will take a look at that asap
>
>
> Thank you for your feedback
>
>
> Ben
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20101110/28ecb5c3/attachment.htm>


More information about the Pharo-project mailing list