Closed eriksoe closed 13 years ago
But it does work for existing functions, such as:
But I can't figure out why it only fails for non-existing functions.
I think I've figured this out. In order to implement erjang.EObject$encode
method for ejang.EFunHandler
, we need something similar to erjang.EFun$make_encode_method_for_exported
and add it to erjang.EFun$get_fun_with_handler
. It seems to be impossible because we don't know module and function name of certain EFunHandler
instance unless its invoke
method has been, well, invoked.
If such observation is true, I think this issue can't be solved.
Fixed.
Thanks for the fix!
==== To reproduce: 1> erlang:term_to_binary(fun erlang:is_lt/2).
=== Observed behaviour: \ exception error: {not_implemented,"Encode for erjang.EFunHandler2", "erjang.EObject.encode(EObject.java:435)"} in function term_to_binary/1