On Fri, Feb 28, 2014 at 8:49 AM, andrew cooke <[email protected]> wrote:

> defining
>   Base.promote_rule(::Type{Int32}, ::Type{Int32}) = Int32
> doesn't help either, and i'm not sure why.
>

Promotion only applies when the types don't already have the same type.
When you write int32(1) + int32(2) you call this method:
https://github.com/JuliaLang/julia/blob/master/base/int.jl#L16, which
explicitly converts the values to your native Int type and then does the
work.

Reply via email to