Maybe a better alternative is to create an internal function with the same name:
real(v…)=Base.real(v…)
real{T<:Real}(::Type{Complex{T}})=T
real{T<:Real}(::Type{T})=T
This will avoid the override leaking from the package.
> On 26 Feb 2015, at 6:07 pm, Sheehan Olver <[email protected]> wrote:
>
> I think this is a case where I know the answer but pretending I don’t :)
>
>
>
>> On 26 Feb 2015, at 6:06 pm, Ivar Nesje <[email protected]> wrote:
>>
>> We have seen quite a few instances where Base functions were extended with
>> methods without restriction to non-Base types, and it caused problems when
>> Julia was updated.
>>
>> Is randomly breaking in new versions of Julia your style?
>