fix local name being string (not symbol)

This commit is contained in:
Torsten Ruger 2018-03-22 21:08:13 +05:30
parent 769fd71a3d
commit 19afc376f4
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ module Risc
#puts message(objekt , depth)
#puts "ADD #{objekt.inspect}, #{objekt.name}" if objekt.is_a? Parfait::TypedMethod
unless objekt.is_a?( Parfait::Object) or objekt.is_a?( Symbol) or objekt.is_a?( Risc::Label)
raise "adding non parfait #{objekt.class}"
raise "adding non parfait #{objekt.class}:#{objekt}"
end
#raise "Method #{objekt.name}" if objekt.is_a? Parfait::TypedMethod
@objects[objekt.object_id] = objekt

View File

@ -14,7 +14,7 @@ module Vool
end
return [condition] if condition.is_a?(Named) or condition.is_a?(Constant)
condition = condition.normalize
local = "tmp_#{object_id}"
local = "tmp_#{object_id}".to_sym
assign = Statements.new [LocalAssignment.new( local , condition)]
[LocalVariable.new(local) , assign]
end