Fix meta_class, sis lass instance variables and class methods
after some serious recursive thinking it now actually makes sense The key was to change the actual type of the class that the meta_class manages For objects it's (still) ok just to change the instance_type, but since the class object exists and has type, when adding instance variables, that actual type has to change
This commit is contained in:
@ -43,6 +43,12 @@ module Parfait
|
||||
inspect
|
||||
end
|
||||
|
||||
# adding an instance changes the instance_type to include that variable
|
||||
def add_instance_variable( name , type)
|
||||
super(name,type)
|
||||
@clazz.set_type(@instance_type)
|
||||
end
|
||||
|
||||
# Nil name means no superclass, and so nil returned
|
||||
def super_class
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user