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

Hit-and-miss method ambiguity detection? #6187

Closed
timholy opened this issue Mar 17, 2014 · 4 comments
Closed

Hit-and-miss method ambiguity detection? #6187

timholy opened this issue Mar 17, 2014 · 4 comments
Assignees

Comments

@timholy
Copy link
Member

timholy commented Mar 17, 2014

In Images, check out commit ddb4259fb2ac39464ed451c5f627d2cd729090ad (I'm about to fix a bunch of ambiguity warnings, but this is a commit that still has them). The list of ambiguity warnings starts with

Warning: New definition 
    -(AbstractImageDirect{T,N},AbstractArray{T,N}) at /home/tim/.julia/v0.3/Images/src/algorithms.jl:17
is ambiguous with: 
    -(AbstractArray{TA,2},UniformScaling{TJ<:Number}) at linalg/uniformscaling.jl:35.
To fix, define 
    -(AbstractImageDirect{TA,2},UniformScaling{TJ<:Number})
before the new definition.

Why is - judged as ambiguous, when the corresponding + (which is also defined in linalg/uniformscaling) is not even mentioned?

@mauro3
Copy link
Contributor

mauro3 commented Oct 12, 2016

Can this be closed now that an error is thrown or is there a deeper issue?

@JeffBezanson
Copy link
Member

The question is whether we are consistently judging similar + and - methods as ambiguous. To close this we have to check that the + and - methods in question are either both ambiguous or both non-ambiguous.

@JeffBezanson JeffBezanson reopened this Oct 12, 2016
@StefanKarpinski
Copy link
Member

If this applies to ambiguity errors now, rather than warnings, how about changing the title?

@JeffBezanson JeffBezanson changed the title Hit-and-miss method ambiguity warnings? Hit-and-miss method ambiguity detection? Oct 12, 2016
@Keno
Copy link
Member

Keno commented Apr 18, 2019

I cannot reproduce this on latest Julia 0.3 with the specified version of Images (all ambiguity warnings that do appear are symmetric between + and -). Regardless, I looked at the signatures from back then and note that one of them has an extra <:Number restriction that may have easily thrown off ambiguity detection. Given that this predates the type system rewrite, I'm gonna call this non-actionable and close it.

@Keno Keno closed this as completed Apr 18, 2019
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

5 participants