Hi, I'm having trubles understanding why the following code generate
'method matching' errors.
In my understanding this 2 signatures should be compatibles:
function signature =>(::AbstractString, ::Array{Dict{AbstractString,Any
},N})
call signature =>(::ASCIIString, ::Array{Dict{ASCIIString,Any},1})
This repl session show the problem:
julia> function ma(s1::AbstractString, ad::Array{Dict{AbstractString,Any}})
return (s1, ad)
end
ma (generic function with 1 method)
julia> function a(s1::AbstractString, s2::AbstractString, s3::AbstractString
, b1::Bool)
return ma(s1, [Dict("s2"=>s2, "s3"=>s3, "b1"=>b1)])
end
a (generic function with 1 method)
julia> ma("s1",[Dict("s2"=>"s2","s3"=>"s3","b1"=>true)])
ERROR: MethodError: `ma` has no method matching ma(::ASCIIString, ::Array{
Dict{ASCIIString,Any},1})
Closest candidates are:
ma(::AbstractString, ::Array{Dict{AbstractString,Any},N})
julia> a("s1","s2","s3", true)
ERROR: MethodError: `ma` has no method matching ma(::ASCIIString, ::Array{
Dict{ASCIIString,Any},1})
Closest candidates are:
ma(::AbstractString, ::Array{Dict{AbstractString,Any},N})
in a at ./none:2
NOTE: I'm new to Julia and I usually try to figure things out by miself but
this time I can't really see the light.