mixed up class and meta, fixed

This commit is contained in:
Torsten Ruger 2015-11-08 00:55:10 +02:00
parent bcc366f8fd
commit 9fd7c79cfb
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ module Soml
name = expression.first name = expression.first
clazz = Parfait::Space.object_space.get_class_by_name! name clazz = Parfait::Space.object_space.get_class_by_name! name
raise "No such class #{name}" unless clazz raise "No such class #{name}" unless clazz
reg = use_reg :Class , clazz reg = use_reg :MetaClass , clazz
add_code Register::LoadConstant.new( expression, clazz , reg ) add_code Register::LoadConstant.new( expression, clazz , reg )
return reg return reg
end end

View File

@ -15,7 +15,7 @@ module Soml
me = use_reg @method.for_class.name me = use_reg @method.for_class.name
add_code Register.get_slot(statement, :message , :receiver , me ) add_code Register.get_slot(statement, :message , :receiver , me )
end end
if(me.type == :Class) if(me.type == :MetaClass)
clazz = me.value.meta clazz = me.value.meta
else else
# now we have to resolve the method name (+ receiver) into a callable method # now we have to resolve the method name (+ receiver) into a callable method