Rewrite system of critics

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Rewrite system of critics


I am investigating a bug in critics.

I found the source of the problem. In Pharo 6 this critic did a
rewrite of the method using RBParseTreeRewriter. This one managed the
case where the refactored node was contained in a cascade or not.

In Pharo 7 the rewrite is done in ReReplaceNodeCritique. But this one
uses a becomeForward: to replace an old node by a rewritten node. But
this breaks in case the new node cannot just replace the old one, like
when it try to introduce a cascade in another cascade.

I don't know renraku enough to fix the problem and I was wondering why
ReReplaceNodeCritique does the replacement itself when we already have

Cyril Ferlicot