<div dir="ltr">Hi Sean,<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 13, 2015 at 8:58 AM, Sean P. DeNigris <span dir="ltr">&lt;<a href="mailto:sean@clipperadams.com" target="_blank">sean@clipperadams.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is a nasty one. If you pull up an inst var via Nautilus menus, any data<br>
in that variable is nil-ed out in all instances. Ouch, not fun :/ Anyone<br>
else experience this? Same on 5.0?<br></blockquote><div><br></div><div>This is a bug in as many refactoring implementations as I&#39;m aware of.  Essentially pull up ivar and push down ivar are decomposed into separate class modifications, and with this approach, without some effort taken at a higher level, ivar state is going to get lost.</div><div><br></div><div>The observation is that with pull up and pull down affected instances don&#39;t need to be become, simply some of their instance variables may need to be permuted.  For example if we have C (ivx) with subclasses SCA (ivy) SCB (ivz) and we pull up ivy to get C (ivx ivy) and SCA () and SCB (ivz) then instances of SCA don&#39;t need to be changed at all, and instances of SCB change from (ivx,ivz) to (ivx,ivy,ivz).  But if we have C (ivi) with subclasses SCA (ivj ivk) SCB (ivl ivm) and we pull up ivk then instances of SCA change from (ivi,ivj,ivk) to (ivi,ivk,ivj).</div><div><br></div><div>I think I&#39;m right in thinking that in all cases the refactoring can be done by modifying classes *without* doing a become on general instances of the class from which the iv is pulled up; instead all that may be needed is a permute.</div><div><br></div><div>The situation is analogous on push down, but even simpler.  No instances change side; all that may happen is that ivars may need to be permuted if there is more than one ivar in the class from which the ivar is pushed down, and that ivar is not the last in the class definition.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----<br>
Cheers,<br>
Sean<br></blockquote><div> </div></div><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>