Inst var mix-up after adding accessors with OB

Zulq Alam me at zulq.net
Thu Oct 25 14:54:48 UTC 2007


If you follow these steps using OB 0.382:

	1) Define class Thing
	2) Add inst var "foo"
	3) Add accessors for "foo" using menu
	4) Add inst var "bar" AFTER "foo"
	5) Add accessors for "bar" using menu
	
the instance variable name list will be sorted from:

	instanceVariableNames: 'foo bar'

to:

	instanceVariableNames: 'bar foo'

and the accesors for "foo" will get and set "bar" such that:

	thing := Thing new.
	thing foo: 'foo'.
	thing bar: 'bar'.
	thing foo -> thing bar  "'bar'->'bar'"

If you upgrade to 0.391 the instance variable name list is not sorted so 
  effectivley the problem goes away.

I'd like to understand how the OB (or refactoring engine) could modify 
the class description without triggering a recompile of the methods?

I tried writing a test case but without knowing how it's side stepping 
the usual recompile I got stuck.

Regards,
Zulq.






More information about the Squeak-dev mailing list