diff --git a/lib/melon/passes/method_compiler.rb b/lib/melon/passes/method_compiler.rb index 5f8be200..2faf51ce 100644 --- a/lib/melon/passes/method_compiler.rb +++ b/lib/melon/passes/method_compiler.rb @@ -30,7 +30,6 @@ module Melon def on_send( statement ) receiver , name , args = *statement w = Vm::Tree::CallSite.new() - puts "receiver #{statement}" w.name = name w.arguments = process(args) || [] w.receiver = process(receiver) diff --git a/lib/vm/parfait/type.rb b/lib/vm/parfait/type.rb index c1d3f320..b2eef9df 100644 --- a/lib/vm/parfait/type.rb +++ b/lib/vm/parfait/type.rb @@ -77,6 +77,8 @@ module Parfait def create_method( method_name , arguments ) raise "create_method #{method_name}.#{method_name.class}" unless method_name.is_a?(Symbol) #puts "Self: #{self.class} clazz: #{clazz.name}" + found = get_method( method_name ) + return found if found arg_type = arguments arg_type = NamedList.type_for( arguments ) if arguments.is_a?(Hash) add_method TypedMethod.new( self , method_name , arg_type )