pharo icon indicating copy to clipboard operation
pharo copied to clipboard

RBAssignment fail on #removeFromTree if in another assignment

Open jecisc opened this issue 5 years ago • 2 comments

I have a script removing assignments from some method and I found it bugs when the assignment is not in a sequence but in another assignment.

For example test := test2 := nil.

Tested in Pharo 8.

jecisc avatar May 08 '20 20:05 jecisc

Maybe it should inline its value instead of failing. In that case produce: test := nil if we try to remove test2.

jecisc avatar May 08 '20 23:05 jecisc

I guess it is better to let it fail in case it does not know what to do instead of doing something unexpected magically. It is not a refactoring but a low level method. The sanity check should be responsibility of the user.

pavel-krivanek avatar Apr 27 '24 10:04 pavel-krivanek