i'm pretty new to julia forgive me if my question is dumb,
for exmaple i defined a type like this:
type Vector2D
x::Float64
y::Float64
end
and 2 object w and v:
v = Vector2D(3, 4)
w = Vector2D(5, 6)
if i add them up it will raise this err : MethodError: no method matching +(::Vector2D, ::Vector2D)
it's ok , but when i want to define a method for
summing theses object
+(a::Vector2D, b::Vector2D) = Vector2D(a.x+b.x, a.y+b.y)
it raise this error :
error in method definition: function Base.+ must be explicitly imported to be extended
julia version 0.5