Specifically, I have defined a method like so:
function addShape(root::CollisionNode, name::String, parent::String, objecthandle, T0)
where CollisionNode is a struct:
struct CollisionNode
name::String
objecthandle::Tuple
T::Array{Float64,(2)}
Tref::Array{Float64, (2)}
children::Dict{String, CollisionNode}
end
When I attempt to call the method like so:
tree = Distance.CollisionNode("root", box1, T, eye(4), Dict{String, Distance.CollisionNode}())
Distance.addShape(tree, "childbox", "root", box2, T)
I get the following error:
ERROR: MethodError: no method matching addShape(::Distance.CollisionNode, ::String, ::String, ::Tuple{Ptr{Void},Ptr{Void}}, ::Array{Int64,2})
Closest candidates are:
addShape(::Distance.CollisionNode, ::String, ::String, ::Any, ::Any)
which appears to be telling me that the closest candidate for a dispatch is in fact the method signature I want and have specified.
I seem to get errors of this flavor quite a lot, and although eventually I fix them I don’t understand the difference between a working and a non-working example. I just play around with the code long enough that they go away.
Clearly I’m missing something fundamental. But what?