Comment #4 on issue 3224 by luc.fabresse: Migrating MethodReference to MethodReferenceWithSource
http://code.google.com/p/pharo/issues/detail?id=3224

some comments.

We must add a hash method on SourcedMethodReference.
I propose:

SourcedMethodReference>>hash
"Answer a SmallInteger whose value is related to the receiver's identity."
    ^ super hash bitXor: self sourcePointer

All instances of SourcedMethodReference should (*must*) have a defined sourcePointer (not be nil) at instanciation time. But it seems that it is not the case since some initializing methods from MethodReference are not redefined in SourcedMethodReference:

MethodReference>>setClass:methodSymbol:
MethodReference>>setClassAndSelectorIn:
MethodReference>>setClassSymbol:classIsMeta:methodSymbol:stringVersion:
MethodReference>>setClass:methodSymbol:stringVersion:

For example, in SystemNavigation a lot of methods use:

SourcedMethodReference new setClass: class methodSymbol: sel

which leave sourcePointer uninitialized.

Did these changes break some tests?



Reply via email to