I’ve been going through the example for writing a convert method and i just can’t get it to work in what should be this very simple case.

Thanks

import Base: -, +, convert

export Point, convert

type Point{T<:Number}

x :: T

y :: T

z :: T

end

function convert{T<:Float64}(::Type{T}, xyz::Tuple{Float64,Float64,Float64})

Point(xyz[1], xyz[2], xyz[3])

end

edit:

ERROR: MethodError: Cannot `convert`

an object of type Tuple{Float64,Float64,Float64} …