[Vm-dev] #adoptInstance: bug?

Levente Uzonyi leves at caesar.elte.hu
Wed Jun 13 20:55:14 UTC 2018

Hi All,

I recently found a bug(?) with #adoptInstance: (primitive 160).
If you create a variable class, let's call it A, and a subclass of it, B, 
where B has an instance variable called foo, then

 	B adoptInstance: (A new: 1)

will fail with error code #'bad receiver', which is fine, because B needs
more slots than A, but

 	A adoptInstance: (B new: 1)

will succeed. The resulting object will have 2 indexable slots instead of 
1, because the instance variable will be converted to an indexable slot.
Is this the expected behavior? (primitive 115 does the same)


More information about the Vm-dev mailing list