[Pharo-project] ChangeSet changedMessageList broken
benjamin.vanryseghem.pharo at gmail.com
Sun May 22 01:56:51 CEST 2011
The "problem" is that MethodReference were used either it was for a method or for a comment. And in this case, the selector was set to #Comment .
Now, there is SourcedMethodReference for methods, and CommentReference for comments.
So this example should be changed I guess
On May 21, 2011, at 11:41 PM, Stefan Marr wrote:
> The following example is broken:
> ChangeSet new commentClass: ChangeSet; changedMessageList
> It will raise an exception that no #Comment message was found in the ChangeSet class.
> (BTW: the key not found error does not name the key, which is rather inconvenient)
> The reason seems to be a change in ChangeSet>>#changedMessageList.
> The change is tracked as being done by Benjamin Van Ryseghem (11/6/2010 22:11)
> and seems to switch from MethodReference to SourcedMethodReference, which breaks the example.
> Does anyone know the intention or context of this change?
> Is it possible to revert to Marcus' pervious version of that method?
> A test for this bug could be the lines of:
> | changeSet |
> changeSet := ChangeSet new.
> changeSet commentClass: ChangeSet.
> self assert: 1 equals: changeSet changedMessageList size.
> self assert: ((changeSet at: 1) isKindOf: MethodReference).
> self assert: #Comment equals: (changeSet at: 1) methodSymbol.
> Best regards
> Stefan Marr
> Software Languages Lab
> Vrije Universiteit Brussel
> Pleinlaan 2 / B-1050 Brussels / Belgium
> Phone: +32 2 629 2974
> Fax: +32 2 629 3525
More information about the Pharo-project