RB: push down

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

RB: push down

rush
It seems that rb: push down variable operation works half way :) , it
deletes variable from the class, but id does not appear in any of the
subclasses.

rush


Reply | Threaded
Open this post in threaded view
|

Re: push down

rush
"rush" <[hidden email]> wrote in message
news:[hidden email]...
> It seems that rb: push down variable operation works half way :) , it
> deletes variable from the class, but id does not appear in any of the
> subclasses.

it seems the problem was in detecting if some subclass methed uses variable
or not; I had something like:

markerMethod
    instanceVariableInQuestion

and rb did not take it as usage of variable. When I changed the above into:


markerMethod
    ^instanceVariableInQuestion

things worked out.

rush


Reply | Threaded
Open this post in threaded view
|

Re: push down

Blair McGlashan
Davorin

You wrote in message news:[hidden email]...
>
> "rush" <[hidden email]> wrote in message
> news:[hidden email]...
> > It seems that rb: push down variable operation works half way :) , it
> > deletes variable from the class, but id does not appear in any of the
> > subclasses.
>
> it seems the problem was in detecting if some subclass methed uses
variable
> or not; I had something like:
>
> markerMethod
>     instanceVariableInQuestion
>
> and rb did not take it as usage of variable. When I changed the above
into:
>
>
> markerMethod
>     ^instanceVariableInQuestion
>
> things worked out.

I think that is probably a bug in the refactoring engine (or alternatively
it is spotting that #markerMethod is dead code :-)).

Regards

Blair