when we do not merge a class and its metaclass the instance variable of a metaclass could have an instanceScope since it is true that the instance variable is an instance one.
Yes
Now when we merge a class and its metaclass the class instance variable should have a class scope since from the base class it is clearly a class scope variable.
humm... class and metaclass variables will belong to one unique instance scope I guess. Why should the class variable be in a different scope? Especially since a class variable begins with a capitalized letter, which is then easy to differ from instance variables.
For shared this is simple they are shared and have a classScope.
When a classes and their respective meta are merged?
Now from a user point of view I would like that an analysis does not depend on whether we merged or not the class and metaclass.
As far as I can see, an analysis may depend on whether you merge classes and metaclasses. It seems hard to imagine than any analysis should be depend on whether there is such a merging.
So I will put classScope to instance variable of the metaclass even when they are not merged with the base class.
This way we always get the following situation
isntance varaible -> instanceScope class instance variable -> classScope shared -> classScope + isShared
Let me know what you think since I will implement the following and write tests.
ah ok. It makes sense to me.
Cheers, Alexandre