From 19afc376f4e360d7d3b1146bd007ab8c014326d1 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 22 Mar 2018 21:08:13 +0530 Subject: [PATCH] fix local name being string (not symbol) --- lib/risc/collector.rb | 2 +- lib/vool/statements/normalizer.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/risc/collector.rb b/lib/risc/collector.rb index 01464748..62be5cb8 100644 --- a/lib/risc/collector.rb +++ b/lib/risc/collector.rb @@ -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 diff --git a/lib/vool/statements/normalizer.rb b/lib/vool/statements/normalizer.rb index 0c6bf40e..94da1987 100644 --- a/lib/vool/statements/normalizer.rb +++ b/lib/vool/statements/normalizer.rb @@ -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