make all instances attr read writers

unfortunately the writers have to have self.var =
otherwise it is just a local var
Also need to make the type explicit for all
Protocol included memory_length on the class for now
This commit is contained in:
Torsten Ruger
2018-08-11 19:15:34 +03:00
parent e6df473647
commit b0aefe31fe
19 changed files with 243 additions and 216 deletions

View File

@ -7,13 +7,13 @@ module Parfait
def initialize
super()
@instance_methods = List.new
instance_methods = List.new
end
def methods
m = @instance_methods
m = instance_methods
return m if m
@instance_methods = List.new
instance_methods = List.new
end
def method_names
@ -45,7 +45,7 @@ module Parfait
raise "resolve_method #{m_name}.#{m_name.class}" unless m_name.is_a?(Symbol)
method = get_instance_method(m_name)
return method if method
if( @super_class_name != :Object )
if( super_class_name != :Object )
method = self.super_class.resolve_method(m_name)
end
method