test correct instance_type creation

so ivar collection happens
and a type is created from the names
This commit is contained in:
Torsten Ruger
2017-04-08 19:20:11 +03:00
parent 96f8bf61ca
commit af196c17d3
5 changed files with 41 additions and 16 deletions

View File

@ -7,7 +7,6 @@ module Vool
end
def collect(arr)
@args.each{ |arg| arg.collect(arr)}
@body.collect(arr)
super
end
@ -28,22 +27,15 @@ module Vool
def make_type( )
type_hash = {}
@args.each do |arg|
puts "ARG #{arg}"
type_hash[arg.children[0]] = :Object
end
@args.each {|arg| type_hash[arg.children[0]] = :Object }
Parfait::NamedList.type_for( type_hash )
end
def make_locals
type_hash = {}
vars = []
@body.collect([]).each do |node|
node.add_local(vars)
end
vars.each do |var|
type_hash[var] = :Object
end
@body.collect([]).each { |node| node.add_local(vars) }
vars.each { |var| type_hash[var] = :Object }
Parfait::NamedList.type_for( type_hash )
end