Hey all!
I was playing around and found a strange behaviour which is unclear to me. Can you help me to find out, where my bug is?
Here is the code snippet:
julia> immutable A end
julia> f(::A) = println("function called")
f (generic function with 1 method)
julia> call_f(a::A) = f(a)
call_f (generic function with 1 method)
julia> function call_f_indirect(a::A)
f() = f(a)
f()
end
call_f_indirect (generic function with 1 method)
julia> a = A()
A()
julia> call_f(a)
function called
julia> call_f_indirect(a)
ERROR: no method f(A)
in f at none:2
in call_f_indirect at none:3
Thank you in advance,
Christoph
P.S.: This code is working if A is a primitive numeric type.