fix resolve issue

the typed method has to be created in the to_pafait pass for it to work correctly, ie for the sends to have something to call

also means that when during compilation creating (raising?) a  method, not only vool. but also callable has to be created
This commit is contained in:
2019-09-29 22:37:28 +03:00
parent 17f87f7464
commit ba83affd8c
11 changed files with 49 additions and 29 deletions

View File

@ -56,8 +56,9 @@ module Vool
def create_method_from_source(compiler)
vool_method = @receiver.ct_type.object_class.resolve_method!(@name)
return nil unless vool_method
puts "#{vool_method} , adding to #{@receiver.ct_type.object_class.name}"
#puts "#{vool_method.name} , adding to #{@receiver.ct_type.object_class.name}"
@receiver.ct_type.object_class.add_instance_method(vool_method)
vool_method.create_callable_method_for(@receiver.ct_type)
new_compiler = vool_method.compiler_for(@receiver.ct_type)
compiler.add_method_compiler(new_compiler)
new_compiler.callable