The following code breaks: (SortedCollectionTest>>#testDo) = (SortedCollectionTest>>#testStoreOn). because it makes use of AdditionalMethodState>>#analogousCodeTo: which tries to send #analogousCodeTo: to a property which is an Association. It seems to me the solution is to implement Association>>#analogousCodeTo: with an equality test: analogousCodeTo: anObject ^self class == anObject class and: [ self = anObject ] Does this make sense? See: https://pharo.fogbugz.com/f/cases/12077/MNU-in-AdditionalMethodState-analogo... Oscar Nierstrasz
On Tue, Dec 3, 2013 at 9:49 AM, Oscar Nierstrasz <oscar.nierstrasz@gmail.com
wrote:
The following code breaks:
(SortedCollectionTest>>#testDo) = (SortedCollectionTest>>#testStoreOn).
because it makes use of AdditionalMethodState>>#analogousCodeTo: which tries to send #analogousCodeTo: to a property which is an Association.
It seems to me the solution is to implement Association>>#analogousCodeTo: with an equality test:
analogousCodeTo: anObject ^self class == anObject class and: [ self = anObject ]
Does this make sense?
Yes. I should have written it this way in the first place. Thanks.
See:
https://pharo.fogbugz.com/f/cases/12077/MNU-in-AdditionalMethodState-analogo...
Oscar Nierstrasz
-- best, Eliot
On Tue, Dec 3, 2013 at 11:27 AM, Eliot Miranda <eliot.miranda@gmail.com>wrote:
On Tue, Dec 3, 2013 at 9:49 AM, Oscar Nierstrasz < oscar.nierstrasz@gmail.com> wrote:
The following code breaks:
(SortedCollectionTest>>#testDo) = (SortedCollectionTest>>#testStoreOn).
because it makes use of AdditionalMethodState>>#analogousCodeTo: which tries to send #analogousCodeTo: to a property which is an Association.
It seems to me the solution is to implement Association>>#analogousCodeTo: with an equality test:
analogousCodeTo: anObject ^self class == anObject class and: [ self = anObject ]
Does this make sense?
Yes. I should have written it this way in the first place. Thanks.
See:
https://pharo.fogbugz.com/f/cases/12077/MNU-in-AdditionalMethodState-analogo...
Oscar Nierstrasz
-- best, Eliot
-- best, Eliot
Marcus/Esteban I opened the bug and it is ready to integrate. https://pharo.fogbugz.com/f/cases/12331/Fixed-CompiledMethod 2013/12/3 Eliot Miranda <eliot.miranda@gmail.com>
On Tue, Dec 3, 2013 at 11:27 AM, Eliot Miranda <eliot.miranda@gmail.com>wrote:
On Tue, Dec 3, 2013 at 9:49 AM, Oscar Nierstrasz < oscar.nierstrasz@gmail.com> wrote:
The following code breaks:
(SortedCollectionTest>>#testDo) = (SortedCollectionTest>>#testStoreOn).
because it makes use of AdditionalMethodState>>#analogousCodeTo: which tries to send #analogousCodeTo: to a property which is an Association.
It seems to me the solution is to implement Association>>#analogousCodeTo: with an equality test:
analogousCodeTo: anObject ^self class == anObject class and: [ self = anObject ]
Does this make sense?
Yes. I should have written it this way in the first place. Thanks.
See:
https://pharo.fogbugz.com/f/cases/12077/MNU-in-AdditionalMethodState-analogo...
Oscar Nierstrasz
-- best, Eliot
-- best, Eliot
participants (3)
-
Clément Bera -
Eliot Miranda -
Oscar Nierstrasz