Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method definition overwritten warnings during bootstrap #18728

Closed
eschnett opened this issue Sep 29, 2016 · 3 comments
Closed

Method definition overwritten warnings during bootstrap #18728

eschnett opened this issue Sep 29, 2016 · 3 comments

Comments

@eschnett
Copy link
Contributor

When bootstrapping Julia 0.5 (release branch) on ARM I see these warnings:

sort.jl
WARNING: Method definition searchsortedfirst(AbstractArray{T<:Any, 1}, Any) in module Sort at sort.jl:184 overwritten at sort.jl:187.
WARNING: Method definition searchsortedlast(AbstractArray{T<:Any, 1}, Any) in module Sort at sort.jl:184 overwritten at sort.jl:187.
WARNING: Method definition searchsorted(AbstractArray{T<:Any, 1}, Any) in module Sort at sort.jl:184 overwritten at sort.jl:187.

The respective method definitions

for s in [:searchsortedfirst, :searchsortedlast, :searchsorted]
    @eval begin
        $s(v::AbstractVector, x, o::Ordering) = $s(v,x,1,length(v),o)
        $s(v::AbstractVector, x;
           lt=isless, by=identity, rev::Bool=false, order::Ordering=Forward) =
            $s(v,x,ord(lt,by,rev,order))
        $s(v::AbstractVector, x) = $s(v, x, Forward)
    end
end

seem indeed conflicting -- they only differ by keyword arguments.

@yuyichao
Copy link
Contributor

This is to workaround kw lowering inefficiency. Can be removed after the kw args are more efficient.

@eschnett
Copy link
Contributor Author

Add a comment to the source explaining this?

Also, if both methods are accessible, then then warning isn't quite right.

@yuyichao
Copy link
Contributor

KW argument affecting dispatch is #9498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants