It’s probably because you already defined Point
for Real
. Defining it for Int
just adds a new method on top of the old. You can add new methods on top of each other as many times as you like, that is how you use multiple dispatch.
Restart Julia to clear the old method definitions.
BTW, instead of Point{<:Int}
, just write Point{Int}
. Int
and Float64
have no subtypes, so <:Int
is just the same as Int
.