removed unused NamedList
args and locals got inlined into message, forgot to delete then ripples out due to type creation small type class api change, more ripples, but also more consistent
This commit is contained in:
@ -37,9 +37,8 @@ module Parfait
|
||||
end
|
||||
|
||||
def test_hash_for_no_ivars
|
||||
list = @space.get_class_by_name(:NamedList )
|
||||
t1 = Parfait::Type.for_hash( list , type: :NewInt)
|
||||
t2 = Parfait::Type.for_hash( list , type: :NewObj)
|
||||
t1 = Parfait::Type.for_hash( {type: :NewInt})
|
||||
t2 = Parfait::Type.for_hash( {type: :NewObj})
|
||||
assert t1.hash != t2.hash , "Hashes should differ"
|
||||
end
|
||||
end
|
||||
|
@ -10,10 +10,10 @@ module Parfait
|
||||
end
|
||||
|
||||
def empty_frame
|
||||
Parfait::Type.for_hash( @try_class , { })
|
||||
Parfait::Type.for_hash( { } , @try_class)
|
||||
end
|
||||
def foo_method( for_class = :Try)
|
||||
args = Parfait::Type.for_hash( @try_class , { bar: :Integer})
|
||||
args = Parfait::Type.for_hash( { bar: :Integer} , @try_class )
|
||||
CallableMethod.new( :foo ,@space.get_type_by_class_name(for_class) , args,empty_frame)
|
||||
end
|
||||
def add_foo_to( clazz = :Try )
|
||||
@ -44,7 +44,7 @@ module Parfait
|
||||
end
|
||||
end
|
||||
def test_create_method
|
||||
args = Parfait::Type.for_hash( @try_class , { bar: :Integer})
|
||||
args = Parfait::Type.for_hash( { bar: :Integer} , @try_class)
|
||||
@try_type.create_method :bar, args , empty_frame
|
||||
assert @try_type.method_names.inspect.include?("bar")
|
||||
end
|
||||
|
@ -5,7 +5,7 @@ module Parfait
|
||||
|
||||
def setup
|
||||
super
|
||||
tc = @space.get_class_by_name( :NamedList )
|
||||
tc = @space.get_class_by_name( :Object )
|
||||
@type = tc.instance_type
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user